Browse Source

fix(server): include trashed assets in existing assets list (#4483)

shenlong 1 year ago
parent
commit
62cb14e4b6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      server/src/immich/api-v1/asset/asset-repository.ts

+ 2 - 0
server/src/immich/api-v1/asset/asset-repository.ts

@@ -172,6 +172,7 @@ export class AssetRepository implements IAssetRepository {
         deviceId,
         isVisible: true,
       },
+      withDeleted: true,
     });
 
     return items.map((asset) => asset.deviceAssetId);
@@ -205,6 +206,7 @@ export class AssetRepository implements IAssetRepository {
         deviceId: checkDuplicateAssetDto.deviceId,
         ownerId,
       },
+      withDeleted: true,
     });
     return assets.map((asset) => asset.deviceAssetId);
   }