From 4c6789055cb6330a9e426a4a31ea3a4fe69ce395 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sun, 16 Jun 2024 09:16:13 -0700 Subject: [PATCH] Fixes import on macOS 15 / Sequoia --- osxphotos/fingerprintquery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osxphotos/fingerprintquery.py b/osxphotos/fingerprintquery.py index 629bad3dd..a376f1301 100644 --- a/osxphotos/fingerprintquery.py +++ b/osxphotos/fingerprintquery.py @@ -39,6 +39,8 @@ def photos_by_fingerprint( """Return a list of tuples of (uuid, date_added, filename) for all photos matching fingerprint""" asset_table = _DB_TABLE_NAMES[self.photos_version]["ASSET"] + fingerprint_column = _DB_TABLE_NAMES[self.photos_version]["MASTER_FINGERPRINT"] + sql = f""" SELECT {asset_table}.ZUUID, @@ -47,7 +49,7 @@ def photos_by_fingerprint( ZADDITIONALASSETATTRIBUTES.ZORIGINALFILENAME FROM {asset_table} JOIN ZADDITIONALASSETATTRIBUTES ON ZADDITIONALASSETATTRIBUTES.ZASSET = {asset_table}.Z_PK - WHERE ZADDITIONALASSETATTRIBUTES.ZMASTERFINGERPRINT = ? + WHERE {fingerprint_column} = ? """ if not in_trash: sql += f"\nAND {asset_table}.ZTRASHEDSTATE = 0"