fix: ensure manually tagged faces have proper source type (#16364)
immich-app/immich#16062 added manual face tagging and deletion, but did not add a new 'SourceType'. The create faces would default to 'machine-learning' which is incorrect, and has the annoying downside that they will be wiped when the 'Refresh Faces' job is run. Handling of non-machine-learning faces was previously added in immich-app/immich#6455. This PR simply extends it to the new manually tagged faces.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsArray, IsInt, IsNotEmpty, IsNumber, IsString, Max, Min, ValidateNested } from 'class-validator';
|
||||
import { IsArray, IsEnum, IsInt, IsNotEmpty, IsNumber, IsString, Max, Min, ValidateNested } from 'class-validator';
|
||||
import { DateTime } from 'luxon';
|
||||
import { PropertyLifecycle } from 'src/decorators';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
@@ -194,6 +194,10 @@ export class AssetFaceCreateDto extends AssetFaceUpdateItem {
|
||||
@IsNotEmpty()
|
||||
@IsNumber()
|
||||
height!: number;
|
||||
|
||||
@ApiProperty({ type: 'string', enum: SourceType, enumName: 'SourceType' })
|
||||
@IsEnum(SourceType)
|
||||
sourceType: SourceType = SourceType.MANUAL;
|
||||
}
|
||||
|
||||
export class AssetFaceDeleteDto {
|
||||
|
||||
Reference in New Issue
Block a user