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

Fix problem when event has no max participants limit

parent b9a4d878
......@@ -116,7 +116,8 @@ class EventRetrieveSerializer(serializers.ModelSerializer):
return unescape(strip_tags(instance.description))
def _num_participants(self, instance):
if instance.num_participants() > instance.max_participants:
if (instance.max_participants and
instance.num_participants() > instance.max_participants):
return instance.max_participants
return instance.num_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