mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
pr feedback
This commit is contained in:
parent
882d9bee04
commit
24c27eb366
@ -225,7 +225,7 @@ export class PersonRepository implements IPersonRepository {
|
|||||||
* - If person.withArchived = false -> Return the count of all unarchived assets for a given person
|
* - If person.withArchived = false -> Return the count of all unarchived assets for a given person
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let queryBuilder = this.assetFaceRepository
|
const queryBuilder = this.assetFaceRepository
|
||||||
.createQueryBuilder('face')
|
.createQueryBuilder('face')
|
||||||
.leftJoin('face.asset', 'asset')
|
.leftJoin('face.asset', 'asset')
|
||||||
.where('face.personId = :personId', { personId })
|
.where('face.personId = :personId', { personId })
|
||||||
@ -234,9 +234,9 @@ export class PersonRepository implements IPersonRepository {
|
|||||||
.select('COUNT(DISTINCT(asset.id))', 'count');
|
.select('COUNT(DISTINCT(asset.id))', 'count');
|
||||||
|
|
||||||
if (options.withArchived === false) {
|
if (options.withArchived === false) {
|
||||||
queryBuilder = queryBuilder.andWhere('asset.isArchived = false');
|
queryBuilder.andWhere('asset.isArchived = false');
|
||||||
} else if (options.withArchived === undefined) {
|
} else if (options.withArchived === undefined) {
|
||||||
queryBuilder = queryBuilder
|
queryBuilder
|
||||||
.leftJoin('face.person', 'person')
|
.leftJoin('face.person', 'person')
|
||||||
.andWhere('((person.withArchived = false AND asset.isArchived = false) OR person.withArchived = true)');
|
.andWhere('((person.withArchived = false AND asset.isArchived = false) OR person.withArchived = true)');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user