From be7f5ebb01483774a78e8105147330b742e10bb6 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 19 Jan 2021 09:59:15 -0800 Subject: [PATCH] Check is_dir before sending to digest. --- frontends/etiquette_flask/backend/endpoints/album_endpoints.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontends/etiquette_flask/backend/endpoints/album_endpoints.py b/frontends/etiquette_flask/backend/endpoints/album_endpoints.py index 1994e83..3181ffb 100644 --- a/frontends/etiquette_flask/backend/endpoints/album_endpoints.py +++ b/frontends/etiquette_flask/backend/endpoints/album_endpoints.py @@ -82,6 +82,8 @@ def post_album_remove_child(album_id): def post_album_refresh_directories(album_id): album = common.P_album(album_id, response_type='json') for directory in album.get_associated_directories(): + if not directory.is_dir: + continue digest = common.P.digest_directory(directory, new_photo_ratelimit=0.1) etiquette.helpers.run_generator(digest) common.P.commit(message='refresh album directories endpoint')