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

Fix absolute uri to default-avatar

parent 4ff2db65
from base64 import b64encode
from django.contrib.staticfiles.finders import find as find_static_file
from django.templatetags.static import static
from django.urls import reverse
from rest_framework import serializers
......@@ -100,4 +101,4 @@ class MemberListSerializer(serializers.ModelSerializer):
'%s%s' % (settings.MEDIA_URL, instance.photo))
else:
return self.context['request'].build_absolute_uri(
'members/images/default-avatar.jpg')
static('members/images/default-avatar.jpg'))
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