Commit 4c42fa17 authored by Joren Vrancken's avatar Joren Vrancken

Fix #177

parent f2794ce5
......@@ -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