fix(server): assets in multiple albums duplicated in map view (#16245)

This commit is contained in:
Mert 2025-02-21 15:32:08 +03:00 committed by GitHub
parent 3925445de8
commit 616905211d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 29 deletions

View file

@ -13,10 +13,19 @@ from
inner join "exif" on "assets"."id" = "exif"."assetId"
and "exif"."latitude" is not null
and "exif"."longitude" is not null
left join "albums_assets_assets" on "assets"."id" = "albums_assets_assets"."assetsId"
where
"isVisible" = $1
and "deletedAt" is null
and "ownerId" in ($2)
and (
"ownerId" in ($2)
or exists (
select
from
"albums_assets_assets"
where
"assets"."id" = "albums_assets_assets"."assetsId"
and "albums_assets_assets"."albumsId" in ($3)
)
)
order by
"fileCreatedAt" desc