From aa7f486259624eb962bf246dfb22e03ca7703e7f Mon Sep 17 00:00:00 2001 From: mertalev <101130780+mertalev@users.noreply.github.com> Date: Thu, 19 Dec 2024 20:04:44 -0500 Subject: [PATCH] closure begone --- server/src/entities/face-search.entity.ts | 2 +- server/src/entities/smart-search.entity.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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[]; }