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

Fix photo uri in events API

parent 029975ca
......@@ -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'))
......
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