fix(server): no exif metadata in the deduplication utility (#15585)

add exif to `getDuplicates`
This commit is contained in:
Mert 2025-01-24 12:42:39 -05:00 committed by GitHub
parent ede9c99adb
commit a6ace5151c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 14 deletions

View file

@ -306,17 +306,26 @@ order by
with
"duplicates" as (
select
"duplicateId",
jsonb_agg("assets") as "assets"
"assets"."duplicateId",
jsonb_agg("asset") as "assets"
from
"assets"
left join lateral (
select
"assets".*,
"exif" as "exifInfo"
from
"exif"
where
"exif"."assetId" = "assets"."id"
) as "asset" on true
where
"ownerId" = $1::uuid
and "duplicateId" is not null
and "deletedAt" is null
and "isVisible" = $2
"assets"."ownerId" = $1::uuid
and "assets"."duplicateId" is not null
and "assets"."deletedAt" is null
and "assets"."isVisible" = $2
group by
"duplicateId"
"assets"."duplicateId"
),
"unique" as (
select