1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

fix(server): avoid duplicate rows in album queries (#15670)

* avoid duplicate rows

* left join, handle null vs. undefined

* update sql
This commit is contained in:
Mert
2025-01-25 23:37:19 -05:00
committed by GitHub
parent 4f725b95e1
commit 05a446c259
6 changed files with 103 additions and 130 deletions

View File

@@ -52,7 +52,10 @@ describe('/albums', () => {
user1Albums = await Promise.all([
utils.createAlbum(user1.accessToken, {
albumName: user1SharedEditorUser,
albumUsers: [{ userId: user2.userId, role: AlbumUserRole.Editor }],
albumUsers: [
{ userId: admin.userId, role: AlbumUserRole.Editor },
{ userId: user2.userId, role: AlbumUserRole.Editor },
],
assetIds: [user1Asset1.id],
}),
utils.createAlbum(user1.accessToken, {