Переглянути джерело

[notifications] Fix bug in getting profile for mood notification

Colin Powell 4 днів тому
батько
коміт
a5295d7973

+ 1 - 1
vrobbler/apps/scrobbles/notifications.py

@@ -11,7 +11,7 @@ class BasicNtfyNotification(ABC):
     title: str = ""
 
     def __init__(self, profile: "UserProfile"):
-        self.profile = profile.user
+        self.profile = profile
         protocol = "http" if settings.DEBUG else "https"
         domain = Site.objects.get_current().domain
         self.url_tmpl = f'{protocol}://{domain}' + '{path}'

+ 2 - 2
vrobbler/apps/scrobbles/scrobblers.py

@@ -858,12 +858,12 @@ def manual_scrobble_task(url: str, user_id: int, source: str = "Vrobbler", actio
         "log": {"description": description, "source_id": source_id},
     }
     logger.info(
-        "[vrobbler-scrobble] webpage scrobble request received",
+        "[vrobbler-scrobble] task scrobble request received",
         extra={
             "task_id": task.id,
             "user_id": user_id,
             "scrobble_dict": scrobble_dict,
-            "media_type": Scrobble.MediaType.WEBPAGE,
+            "media_type": Scrobble.MediaType.TASK,
         },
     )
     scrobble = Scrobble.create_or_update(task, user_id, scrobble_dict)