From 4f063cd90e2c32725427acef0ab7c125c8a218f0 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 21 Aug 2022 14:01:43 -0700 Subject: [PATCH] Fix return value of (photo, is_new) for digest. --- etiquette/photodb.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 2ab48d6..b529dca 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -1321,15 +1321,14 @@ class PDBUtilMixin: otherwise create it and then return it. ''' try: - photo = (self.get_photo_by_path(filepath), False) - return photo + return (self.get_photo_by_path(filepath), False) except exceptions.NoSuchPhoto: pass result = check_renamed(filepath) if isinstance(result, objects.Photo): result.relocate(filepath.absolute_path) - return result + return (result, False) elif isinstance(result, dict) and 'sha256' in result: sha256 = result['sha256'] else: