Fix for bug in handling of deleted albums to address issue #156

This commit is contained in:
Rhet Turnbull
2020-06-07 08:14:02 -07:00
parent cb993f2e5e
commit 72f034ef85
14 changed files with 66 additions and 6 deletions

View File

@@ -1,3 +1,3 @@
""" version info """
__version__ = "0.29.11"
__version__ = "0.29.12"

View File

@@ -2133,7 +2133,11 @@ class PhotosDB:
if album in self._dbalbum_titles:
title_set = set()
for album_id in self._dbalbum_titles[album]:
title_set.update(self._dbalbums_album[album_id])
try:
title_set.update(self._dbalbums_album[album_id])
except KeyError:
# an empty album will be in _dbalbum_titles but not _dbalbums_album
pass
album_set.update(title_set)
else:
logging.debug(f"Could not find album '{album}' in database")