Commit 0474b076 authored by Tom van Bussel's avatar Tom van Bussel
Browse files

Merge branch 'fix/events-no-max-participants' into 'master'

Fix problem when event has no max participants limit

See merge request !557
parents a8d5aed9 df2284c7
......@@ -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