[scrobbles] Fix a migration and how we save timezones

This commit is contained in:
2024-04-19 10:17:38 -04:00
parent 5cdd12783f
commit b470e7acea
2 changed files with 16 additions and 1 deletions

View File

@ -559,7 +559,10 @@ class Scrobble(TimeStampedModel):
self.uuid = uuid4()
if not self.timezone:
self.timezone = self.user.profile.timezone
timezone = settings.TIME_ZONE
if self.user.profile:
timezone = self.user.profile.timezone
self.timzeone = timezone
# Microseconds mess up Django's filtering, and we don't need be that specific
if self.timestamp: