Commit 7d1e412a authored by Tom van Bussel's avatar Tom van Bussel
Browse files

Merge branch 'fix/api-avatars' into 'master'

Fix photo uri in events API

See merge request !637
parents a64bdbda 6daf23d8
......@@ -307,7 +307,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