Преглед на файлове

[scrobbles] Fix scrobble having no user in tests

Colin Powell преди 1 година
родител
ревизия
37da74708c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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