Parcourir la source

Fix case where cover url is missing

Colin Powell il y a 1 an
Parent
commit
f55aed7b3d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      vrobbler/apps/videogames/utils.py

+ 1 - 1
vrobbler/apps/videogames/utils.py

@@ -124,7 +124,7 @@ def load_game_data_from_igdb(
             fname = f"{game.title}_{game.uuid}.jpg"
             game.screenshot.save(fname, ContentFile(r.content), save=True)
 
-    if not game.cover:
+    if not game.cover and cover_url:
         r = requests.get(cover_url)
         if r.status_code == 200:
             fname = f"{game.title}_{game.uuid}.jpg"