1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 13:59:36 +02:00

Fix adventure cards and serializers

This commit is contained in:
Sean Morley 2024-08-13 11:09:49 -04:00
parent 5aef1eb8bd
commit ffe9d6fe97
4 changed files with 7 additions and 7 deletions

View file

@ -174,7 +174,7 @@ class CustomUserDetailsSerializer(UserDetailsSerializer):
representation = super().to_representation(instance)
if instance.profile_pic:
public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/')
print(public_url)
#print(public_url)
# remove any ' from the url
public_url = public_url.replace("'", "")
representation['profile_pic'] = f"{public_url}/media/{instance.profile_pic.name}"