mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
fix(server): include deleted assets if searching offline assets (#16417)
include deleted assets if searching for offline assets
This commit is contained in:
parent
819e56d9ca
commit
b3b15e9b61
1 changed files with 1 additions and 1 deletions
|
@ -352,7 +352,7 @@ const joinDeduplicationPlugin = new DeduplicateJoinsPlugin();
|
|||
/** TODO: This should only be used for search-related queries, not as a general purpose query builder */
|
||||
export function searchAssetBuilder(kysely: Kysely<DB>, options: AssetSearchBuilderOptions) {
|
||||
options.isArchived ??= options.withArchived ? undefined : false;
|
||||
options.withDeleted ||= !!(options.trashedAfter || options.trashedBefore);
|
||||
options.withDeleted ||= !!(options.trashedAfter || options.trashedBefore || options.isOffline);
|
||||
return kysely
|
||||
.withPlugin(joinDeduplicationPlugin)
|
||||
.selectFrom('assets')
|
||||
|
|
Loading…
Add table
Reference in a new issue