Przeglądaj źródła

[scrobbles] Fix scrobble having no user in tests

Colin Powell 1 rok temu
rodzic
commit
37da74708c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      vrobbler/apps/scrobbles/models.py

+ 1 - 1
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