mirror of
https://github.com/immich-app/immich.git
synced 2026-06-12 19:11:52 -07:00
fix(server): empty trash skips offline external library assets
This commit is contained in:
@@ -15,7 +15,8 @@ set
|
||||
"status" = $1
|
||||
where
|
||||
"ownerId" = $2
|
||||
and "status" = $3
|
||||
and "deletedAt" is not null
|
||||
and "status" != $3
|
||||
|
||||
-- TrashRepository.restoreAll
|
||||
update "asset"
|
||||
|
||||
@@ -28,7 +28,8 @@ export class TrashRepository {
|
||||
const { numUpdatedRows } = await this.db
|
||||
.updateTable('asset')
|
||||
.where('ownerId', '=', userId)
|
||||
.where('status', '=', AssetStatus.Trashed)
|
||||
.where('deletedAt', 'is not', null)
|
||||
.where('status', '!=', AssetStatus.Deleted)
|
||||
.set({ status: AssetStatus.Deleted })
|
||||
.executeTakeFirst();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user