Fix early access of url that may not exist
This commit is contained in:
@ -212,7 +212,7 @@ class Album(TimeStampedModel):
|
||||
|
||||
@property
|
||||
def primary_image_url(self) -> str:
|
||||
if self.cover_image.url:
|
||||
if self.cover_image:
|
||||
return self.cover_image_medium.url
|
||||
return ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user