Commit dd3e00f8 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

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): ...@@ -70,7 +70,7 @@ class EventAdmin(DoNextModelAdmin):
def num_participants(self, obj): def num_participants(self, obj):
"""Pretty-print the number of participants""" """Pretty-print the number of participants"""
num = (obj.registration_set num = (obj.registration_set
.filter( .exclude(
if not obj.max_participants: if not obj.max_participants:
return '{}/∞'.format(num) return '{}/∞'.format(num)
return '{}/{}'.format(num, obj.max_participants) 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