Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
b7c7163a
Verified
Commit
b7c7163a
authored
Jun 08, 2017
by
Sébastiaan Versteeg
Browse files
Prevent 2 calls to queue_position
parent
cf29cc4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/events/api/serializers.py
View file @
b7c7163a
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment