mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(server): include trashed asset during face re-index and cleanup (#4450)
This commit is contained in:
parent
41af76bbe2
commit
f3b17d8f73
1 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,7 @@ export class PersonRepository implements IPersonRepository {
|
|||
}
|
||||
|
||||
getAllFaces(): Promise<AssetFaceEntity[]> {
|
||||
return this.assetFaceRepository.find({ relations: { asset: true } });
|
||||
return this.assetFaceRepository.find({ relations: { asset: true }, withDeleted: true });
|
||||
}
|
||||
|
||||
getAll(): Promise<PersonEntity[]> {
|
||||
|
@ -88,6 +88,7 @@ export class PersonRepository implements IPersonRepository {
|
|||
.leftJoin('person.faces', 'face')
|
||||
.having('COUNT(face.assetId) = 0')
|
||||
.groupBy('person.id')
|
||||
.withDeleted()
|
||||
.getMany();
|
||||
}
|
||||
|
||||
|
@ -142,7 +143,7 @@ export class PersonRepository implements IPersonRepository {
|
|||
}
|
||||
|
||||
async getFacesByIds(ids: AssetFaceId[]): Promise<AssetFaceEntity[]> {
|
||||
return this.assetFaceRepository.find({ where: ids, relations: { asset: true } });
|
||||
return this.assetFaceRepository.find({ where: ids, relations: { asset: true }, withDeleted: true });
|
||||
}
|
||||
|
||||
async getRandomFace(personId: string): Promise<AssetFaceEntity | null> {
|
||||
|
|
Loading…
Reference in a new issue