Skip to content

Commit

Permalink
Merge pull request #5 from Jakan-Kink/gallery-folder-none
Browse files Browse the repository at this point in the history
Gallery exists, but the folder or path value does not
  • Loading branch information
toddhow authored Aug 5, 2024
2 parents 0711af3 + d95a72a commit 2db239a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fanscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ def get_gallery_path(gallery_id):
gallery = stash.find_gallery(gallery_id)
# log.debug(gallery)
if gallery:
return gallery["folder"]["path"]
if gallery.get("folder",None):
if gallery["folder"].get("path",None):
return gallery["folder"]["path"]

log.error(f'Path for gallery {gallery_id} could not be found')
print('null')
Expand Down

0 comments on commit 2db239a

Please sign in to comment.