Ver código fonte

[scrobbles] Fix datalog return value and message

Colin Powell 8 meses atrás
pai
commit
cfd6ac861e
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      vrobbler/apps/scrobbles/models.py

+ 3 - 3
vrobbler/apps/scrobbles/models.py

@@ -603,13 +603,13 @@ class Scrobble(TimeStampedModel):
                 )
 
     @property
-    def logdata(self) -> dict:
+    def logdata(self) -> Optional[logdata.JSONDataclass]:
         if not self.media_obj.logdata_cls:
             logger.warn(
-                f"Media type has no log data class",
+                f"Media type has no log data class, you should add one!",
                 extra={"media_type": self.media_type, "scrobble_id": self.id},
             )
-            return {}
+            return None
 
         return self.media_obj.logdata_cls.from_dict(json.loads(self.log))