Check is_dir before sending to digest.

This commit is contained in:
voussoir 2021-01-19 09:59:15 -08:00
parent 9f9d724a71
commit be7f5ebb01
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -82,6 +82,8 @@ def post_album_remove_child(album_id):
def post_album_refresh_directories(album_id): def post_album_refresh_directories(album_id):
album = common.P_album(album_id, response_type='json') album = common.P_album(album_id, response_type='json')
for directory in album.get_associated_directories(): for directory in album.get_associated_directories():
if not directory.is_dir:
continue
digest = common.P.digest_directory(directory, new_photo_ratelimit=0.1) digest = common.P.digest_directory(directory, new_photo_ratelimit=0.1)
etiquette.helpers.run_generator(digest) etiquette.helpers.run_generator(digest)
common.P.commit(message='refresh album directories endpoint') common.P.commit(message='refresh album directories endpoint')