fix(server): library refresh not checking trashed assets (#10495)

* set `withDeleted`

* update sql
This commit is contained in:
Mert
2024-06-19 16:42:55 -04:00
committed by GitHub
parent 7ea0278b32
commit 1191978d50
2 changed files with 4 additions and 9 deletions

View File

@@ -188,7 +188,8 @@ export class AssetRepository implements IAssetRepository {
@GenerateSql({ params: [DummyValue.UUID, DummyValue.STRING] })
getByLibraryIdAndOriginalPath(libraryId: string, originalPath: string): Promise<AssetEntity | null> {
return this.repository.findOne({
where: { library: { id: libraryId }, originalPath: originalPath },
where: { library: { id: libraryId }, originalPath },
withDeleted: true,
});
}