Skip to content
GitLab
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
6daf23d8
Verified
Commit
6daf23d8
authored
Dec 17, 2017
by
Sébastiaan Versteeg
Browse files
Fix photo uri in events API
parent
029975ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/events/api/serializers.py
View file @
6daf23d8
...
...
@@ -284,7 +284,7 @@ class RegistrationSerializer(serializers.ModelSerializer):
def
_photo
(
self
,
instance
):
if
instance
.
member
and
instance
.
member
.
profile
.
photo
:
return
self
.
context
[
'request'
].
build_absolute_uri
(
'%s%s'
%
(
settings
.
MEDIA_URL
,
instance
.
profile
.
photo
))
'%s%s'
%
(
settings
.
MEDIA_URL
,
instance
.
member
.
profile
.
photo
))
else
:
return
self
.
context
[
'request'
].
build_absolute_uri
(
static
(
'members/images/default-avatar.jpg'
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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