feat(server): sort images in duplicate groups by date (#18347)

This restores behaviour introduced in
562fec6e2b and lost in
2e12c46980.
This commit is contained in:
Geoffrey Frogeye 2025-05-19 23:27:30 +02:00 committed by GitHub
parent c8641d24f6
commit 00a77c2d6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View file

@ -296,7 +296,11 @@ with
"duplicates" as (
select
"assets"."duplicateId",
jsonb_agg("asset") as "assets"
json_agg(
"asset"
order by
"assets"."localDateTime" asc
) as "assets"
from
"assets"
left join lateral (
@ -323,7 +327,7 @@ with
from
"duplicates"
where
jsonb_array_length("assets") = $3
json_array_length("assets") = $3
),
"removed_unique" as (
update "assets"