fix(server): access face count when the value is undefined (#7694)

pull/7697/head
Alex 2024-03-06 22:21:10 +07:00 committed by GitHub
parent cd058fdafa
commit e823b39579
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

@ -223,6 +223,10 @@ export class PersonRepository implements IPersonRepository {
.having('COUNT(face.assetId) != 0')
.getRawOne();
if (items == undefined) {
return { total: 0, hidden: 0 };
}
const result: PeopleStatistics = {
total: items.total ?? 0,
hidden: items.hidden ?? 0,