From 37da74708cd7c0b779f852d6737b8fc14938068a Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 19 Apr 2024 10:31:33 -0400 Subject: [PATCH] [scrobbles] Fix scrobble having no user in tests --- vrobbler/apps/scrobbles/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index f4c9132..cbc64cf 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -560,7 +560,7 @@ class Scrobble(TimeStampedModel): if not self.timezone: timezone = settings.TIME_ZONE - if self.user.profile: + if self.user and self.user.profile: timezone = self.user.profile.timezone self.timzeone = timezone