Merge 98c8e2b091364ee2e5d8e3f98ddc601cc13a5d0e into 4d20b11f256c40e3894c229ed638d7ea04ebdc44

This commit is contained in:
Lukas 2024-10-01 15:35:49 -04:00 committed by GitHub
commit b07c036de2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,6 +108,12 @@ export function searchAssetBuilder(
),
);
if ((isArchived || withArchived) && options.userIds && options.userIds.length > 0) {
builder.andWhere(`NOT (${builder.alias}.isArchived = true AND ${builder.alias}.ownerId != :userId)`, {
userId: options.userIds[0],
});
}
if (isNotInAlbum) {
builder
.leftJoin(`${builder.alias}.albums`, 'albums')