From d1de4103e1336d7662161891068d3a72d8f528d3 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 1 Dec 2023 00:20:55 +0100 Subject: [PATCH] Fix early access of url that may not exist --- vrobbler/apps/music/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrobbler/apps/music/models.py b/vrobbler/apps/music/models.py index 2c0a6cc..5679b89 100644 --- a/vrobbler/apps/music/models.py +++ b/vrobbler/apps/music/models.py @@ -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 ""