Commit 6d3900ec authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Merge branch 'fix/events-cancel-registrations' into 'master'

Fix cancellation when no users are on the waiting list

See merge request !367
parents 26dc580d 99f538e0
...@@ -232,10 +232,9 @@ def registration(request, event_id, action=None): ...@@ -232,10 +232,9 @@ def registration(request, event_id, action=None):
if (obj is not None and if (obj is not None and
obj.date_cancelled is None): obj.date_cancelled is None):
if (event.max_participants is not None and if (event.max_participants is not None and
(Registration.objects Registration.objects
.filter(event=event, .filter(event=event, date_cancelled=None)
date_cancelled=None).count()) >= .count() > event.max_participants):
event.max_participants):
# Prepare email to send to the first person on the waiting # Prepare email to send to the first person on the waiting
# list # list
first_waiting = (Registration.objects first_waiting = (Registration.objects
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment