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

Prevent 2 calls to queue_position

parent cf29cc4f
......@@ -179,8 +179,8 @@ class RegistrationSerializer(serializers.ModelSerializer):
return instance.is_late_cancellation()
def _queue_position(self, instance):
return (instance.queue_position()
if instance.queue_position() > 0 else None)
pos = instance.queue_position()
return pos if pos > 0 else None
def _is_cancelled(self, instance):
return instance.date_cancelled is not None
......
Supports Markdown
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