fix(server, web): reassigning faces (#9265)

* fix: reassiging faces

* fix: rename
This commit is contained in:
martin
2024-05-05 20:16:44 +02:00
committed by GitHub
parent 090592e5ae
commit cf79bc9ed7
6 changed files with 50 additions and 27 deletions

View File

@@ -36,6 +36,7 @@ import { Instrumentation } from 'src/utils/instrumentation';
import { Paginated, PaginationMode, PaginationOptions, paginate, paginatedBuilder } from 'src/utils/pagination';
import {
Brackets,
FindOptionsOrder,
FindOptionsRelations,
FindOptionsSelect,
FindOptionsWhere,
@@ -236,12 +237,17 @@ export class AssetRepository implements IAssetRepository {
}
@GenerateSql({ params: [DummyValue.UUID] })
getById(id: string, relations: FindOptionsRelations<AssetEntity>): Promise<AssetEntity | null> {
getById(
id: string,
relations: FindOptionsRelations<AssetEntity>,
order?: FindOptionsOrder<AssetEntity>,
): Promise<AssetEntity | null> {
return this.repository.findOne({
where: { id },
relations,
// We are specifically asking for this asset. Return it even if it is soft deleted
withDeleted: true,
order,
});
}

View File

@@ -104,6 +104,9 @@ export class PersonRepository implements IPersonRepository {
relations: {
person: true,
},
order: {
boundingBoxX1: 'ASC',
},
});
}