Skip to content

Commit

Permalink
Fix ticket_drop_time editing time restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
julianweng committed Feb 6, 2025
1 parent 15ec2a9 commit a531327
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/clubs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3216,7 +3216,10 @@ def partial_update(self, request, *args, **kwargs):
event = self.get_object()
if (
"ticket_drop_time" in request.data
and parse(request.data["ticket_drop_time"]) >= timezone.now()
and (
event.ticket_drop_time is None # case where sales immediately start
or event.ticket_drop_time <= timezone.now()
)
and Ticket.objects.filter(event=event, owner__isnull=False).exists()
):
raise DRFValidationError(
Expand Down

0 comments on commit a531327

Please sign in to comment.