Commit dd3e00f8 authored by Thom Wiggers's avatar Thom Wiggers

Merge branch 'fix/aanmeldingen_aantal_admin_overzicht' into 'master'

Juist aantal aanmeldingen op admin pagina.

Closes #177

See merge request !191
parents df111451 4c42fa17
......@@ -70,7 +70,7 @@ class EventAdmin(DoNextModelAdmin):
def num_participants(self, obj):
"""Pretty-print the number of participants"""
num = (obj.registration_set
.filter(date_cancelled__lt=timezone.now()).count())
.exclude(date_cancelled__lt=timezone.now()).count())
if not obj.max_participants:
return '{}/∞'.format(num)
return '{}/{}'.format(num, obj.max_participants)
......
Markdown is supported
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