Identity background images can be relative (#250)

This commit is contained in:
Michael Manfre 2022-12-23 23:57:50 -05:00 committed by GitHub
parent 043a41afd3
commit 9fb18ac841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,7 +278,7 @@ class Identity(StatorModel):
Returns a background image for us, returning None if there isn't one
"""
if self.image:
return RelativeAbsoluteUrl(self.image.url)
return AutoAbsoluteUrl(self.image.url)
elif self.image_uri:
return AutoAbsoluteUrl(f"/proxy/identity_image/{self.pk}/")
return None