Fixed warning message for duplicate edit_resource_id

This commit is contained in:
Rhet Turnbull
2019-12-07 13:13:34 -08:00
parent 2a0f27ca57
commit 811946018d
2 changed files with 3 additions and 2 deletions

View File

@@ -656,13 +656,14 @@ class PhotosDB:
and row[6] == 2 and row[6] == 2
): ):
if "edit_resource_id" in self._dbphotos[uuid]: if "edit_resource_id" in self._dbphotos[uuid]:
logging.warning( logging.debug(
f"WARNING: found more than one edit_resource_id for " f"WARNING: found more than one edit_resource_id for "
f"UUID {row[0]},adjustmentUUID {row[1]}, modelID {row[2]}" f"UUID {row[0]},adjustmentUUID {row[1]}, modelID {row[2]}"
) )
# TODO: I think there should never be more than one edit but # TODO: I think there should never be more than one edit but
# I've seen this once in my library # I've seen this once in my library
# should we return all edits or just most recent one? # should we return all edits or just most recent one?
# For now, return most recent edit
self._dbphotos[uuid]["edit_resource_id"] = row[2] self._dbphotos[uuid]["edit_resource_id"] = row[2]
# get details on external edits # get details on external edits

View File

@@ -38,7 +38,7 @@ with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
setup( setup(
name="osxphotos", name="osxphotos",
version="0.14.11", version="0.14.12",
description="Manipulate (read-only) Apple's Photos app library on Mac OS X", description="Manipulate (read-only) Apple's Photos app library on Mac OS X",
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",