Procházet zdrojové kódy

[scrobbles] Fix if log does not exist

Colin Powell před 6 měsíci
rodič
revize
0679af3029
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      vrobbler/apps/scrobbles/models.py

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

@@ -1189,7 +1189,7 @@ class Scrobble(TimeStampedModel):
         if profile.ntfy_enabled and profile.ntfy_url:
             # TODO allow prority and tags to be configured in the profile
             notify_str = f"{scrobble.media_obj}"
-            if scrobble.log.get("description"):
+            if scrobble.log and scrobble.log.get("description"):
                 notify_str += f" - {scrobble.log.get('description')}"
             requests.post(
                 profile.ntfy_url,