Verified Commit 80ee93dc authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix #323, marking everyone at event as present

parent 0ffc7234
......@@ -302,9 +302,15 @@ def registration(request, event_id, action=None):
def all_present(request, event_id):
event = get_object_or_404(Event, pk=event_id)
registrations = event.registration_set.all()
for registration in registrations:
registration.present = True
registration.paid = True
if event.max_participants is None:
registrations_query = event.registration_set.filter(
registrations_query = (event.registration_set
registrations_query.update(present=True, paid=True)
return HttpResponseRedirect('/events/admin/{}'.format(event_id))
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