Fix audioscrobbler import bug

Issue was not having a user so we couldn't set a timezone. All fixed now
This commit is contained in:
2023-02-06 19:30:58 -05:00
parent 0c10e78d5e
commit 117157e3ae
5 changed files with 51 additions and 4 deletions

View File

@ -1,3 +1,5 @@
import pytz
from django.contrib.auth import get_user_model
from django.db import models
from django_extensions.db.models import TimeStampedModel
@ -16,3 +18,7 @@ class UserProfile(TimeStampedModel):
def __str__(self):
return f"User profile for {self.user}"
@property
def tzinfo(self):
return pytz.timezone(self.timezone)