Skip to content

Commit

Permalink
fix: absolute image path to relative
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Salman authored and Ali Salman committed Nov 28, 2023
1 parent b6e0eaa commit e671e41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lms/djangoapps/badges/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_profile_image_url(self, instance):
str: The profile image URL.
"""
return get_profile_image_urls_for_user(instance)['medium']
return get_profile_image_urls_for_user(instance, self.context['request'])['medium']

class Meta:
model = User
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/course_home_api/course_metadata/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get(self, request, *args, **kwargs):
'celebrations': celebrations,
'user_timezone': user_timezone,
'can_view_certificate': certificates_viewable_for_course(course),
'profile_image_url': get_profile_image_urls_for_user(request.user)['medium'],
'profile_image_url': get_profile_image_urls_for_user(request.user, request)['medium'],
}
context = self.get_serializer_context()
context['course'] = course
Expand Down

0 comments on commit e671e41

Please sign in to comment.