diff --git a/server/src/entities/face-search.entity.ts b/server/src/entities/face-search.entity.ts index e353260fe0..2887453862 100644 --- a/server/src/entities/face-search.entity.ts +++ b/server/src/entities/face-search.entity.ts @@ -14,7 +14,7 @@ export class FaceSearchEntity { @Column({ type: 'float4', array: true, - transformer: { from: (v) => JSON.parse(v), to: (v) => `[${v}]` }, + transformer: { from: JSON.parse, to: (v) => `[${v}]` }, }) embedding!: number[]; } diff --git a/server/src/entities/smart-search.entity.ts b/server/src/entities/smart-search.entity.ts index da1e0e52f1..66017152ea 100644 --- a/server/src/entities/smart-search.entity.ts +++ b/server/src/entities/smart-search.entity.ts @@ -11,6 +11,6 @@ export class SmartSearchEntity { assetId!: string; @Index('clip_index', { synchronize: false }) - @Column({ type: 'float4', array: true, transformer: { from: (v) => JSON.parse(v), to: (v) => v } }) + @Column({ type: 'float4', array: true, transformer: { from: JSON.parse, to: (v) => v } }) embedding!: number[]; }