Commit 8a0f0194 authored by John Red Medrano's avatar John Red Medrano

Merge pull request #611 in RMS/api-main-service from SIT to staging

* commit '9f64d14f':
  add replace on absolute url and manually set the http to https
parents c5f77f1a 9f64d14f
......@@ -80,17 +80,9 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
primayPic = user.user_images.filter(is_primary=True).first()
if primayPic:
# print(request.build_absolute_uri(primayPic.image.url))
# print(request)
# return request.build_absolute_uri(primayPic.image.url)
print(
os.path.join(settings.MEDIA_ROOT)
)
print(
os.path.join(settings.MEDIA_ROOT, f'user_images/{primayPic.image.url}')
)
return request.build_absolute_uri(primayPic.image.url)
# return request.build_absolute_uri('/media/no-user.png')
path = request.build_absolute_uri(primayPic.image.url)
path = path.replace('http', 'https')
return path
else:
return request.build_absolute_uri('/media/no-user.png')
......
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