Skip to content
Snippets Groups Projects
Commit 88b838f6 authored by Sharon Wang's avatar Sharon Wang
Browse files

exception for profile

parent 910f1c45
No related branches found
No related tags found
No related merge requests found
......@@ -219,6 +219,7 @@ def _set_deprecated_logged_in_cookie(response, cookie_settings):
return response
def _convert_to_absolute_uris(request, urls_obj):
""" Convert relative URL paths to absolute URIs """
for url_name, url_path in six.iteritems(urls_obj):
......@@ -226,6 +227,7 @@ def _convert_to_absolute_uris(request, urls_obj):
return urls_obj
def _get_user_info_cookie_data(request, user):
""" Returns information that will populate the user info cookie. """
......@@ -255,8 +257,10 @@ def _get_user_info_cookie_data(request, user):
header_urls = _convert_to_absolute_uris(request, header_urls)
image_urls = {}
if user.profile:
try:
image_urls = get_profile_image_urls_for_user(user)
except UserProfile.DoesNotExist:
pass
image_urls = _convert_to_absolute_uris(request, image_urls)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment