Commit 4dadba2e authored by John Red Medrano's avatar John Red Medrano

Merge pull request #667 in RMS/api-main-service from red-develop to product-dev

* commit '7c6c653c':
  fixing
parents d9b29e70 7c6c653c
...@@ -98,6 +98,7 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer): ...@@ -98,6 +98,7 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
primayPic = user.user_images.first() primayPic = user.user_images.first()
# print(primayPic) # print(primayPic)
if user.user_images.count() >= 1:
path = request.build_absolute_uri(primayPic.image.url) path = request.build_absolute_uri(primayPic.image.url)
path = path.replace('https', 'http') path = path.replace('https', 'http')
return path return path
...@@ -105,8 +106,8 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer): ...@@ -105,8 +106,8 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
# path = request.build_absolute_uri(primayPic.image.url) # path = request.build_absolute_uri(primayPic.image.url)
# path = path.replace('http', 'https') # path = path.replace('http', 'https')
# return path # return path
# else: else:
# return request.build_absolute_uri('/media/no-user.png') return request.build_absolute_uri('/media/no-user.png')
def get_applications(self, user): def get_applications(self, user):
if user.user_type.upper() == enums.UserTypeEnum.USER.value: if user.user_type.upper() == enums.UserTypeEnum.USER.value:
......
from .base import * from .base import *
import configparser import configparser
DEBUG = True DEBUG = False
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
# CORS_ORIGIN_ALLOW_ALL = True # CORS_ORIGIN_ALLOW_ALL = True
......
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