Skip to content

Commit 74eb7c1

Browse files
committed
Merged in [19177] from rjsparks@nostrum.com:
Additional tweak to oidc profile photo url generation. - Legacy-Id: 19179 Note: SVN reference [19177] has been migrated to Git commit a3305e1
2 parents 09595b8 + a3305e1 commit 74eb7c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/person/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ def cdn_photo_url(self, size=80):
250250
source_url = self.photo.url
251251
if source_url.startswith(settings.IETF_HOST_URL):
252252
source_url = source_url[len(settings.IETF_HOST_URL):]
253-
return f'{settings.IETF_HOST_URL}cdn-cgi/image/fit=scale-down,width={size},height={size}{source_url}'
253+
elif source_url.startswith('/'):
254+
source_url = source_url[1:]
255+
return f'{settings.IETF_HOST_URL}cdn-cgi/image/fit=scale-down,width={size},height={size}/{source_url}'
254256
else:
255257
datatracker_photo_path = urlreverse('ietf.person.views.photo', kwargs={'email_or_name': self.email()})
256258
datatracker_photo_url = settings.IDTRACKER_BASE_URL + datatracker_photo_path

0 commit comments

Comments
 (0)