Skip to content

Commit

Permalink
Fixes import on macOS 15 / Sequoia
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Jun 16, 2024
1 parent f143dbb commit 4c67890
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osxphotos/fingerprintquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"
Expand Down

0 comments on commit 4c67890

Please sign in to comment.