mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(server): assets in multiple albums duplicated in map view (#16245)
This commit is contained in:
parent
3925445de8
commit
616905211d
3 changed files with 23 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue