Commit 7c6c653c authored by John Red Medrano's avatar John Red Medrano

fixing

parent 5e5b16c4
...@@ -98,15 +98,16 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer): ...@@ -98,15 +98,16 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
primayPic = user.user_images.first() primayPic = user.user_images.first()
# print(primayPic) # print(primayPic)
path = request.build_absolute_uri(primayPic.image.url) if user.user_images.count() >= 1:
path = path.replace('https', 'http') path = request.build_absolute_uri(primayPic.image.url)
return path path = path.replace('https', 'http')
return path
# if primayPic: # if primayPic:
# 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