From d60dc60bc95bfc48c46d18aa6d46a75f4a4fffd8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Aug 2021 22:10:05 +0900 Subject: [PATCH] fix(server): use insert instead of save --- src/services/chart/core.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/chart/core.ts b/src/services/chart/core.ts index 8fa0cd0aa..3c0526d2e 100644 --- a/src/services/chart/core.ts +++ b/src/services/chart/core.ts @@ -315,11 +315,11 @@ export default abstract class Chart> { if (currentLog != null) return currentLog; // 新規ログ挿入 - log = await this.repository.save({ + log = await this.repository.insert({ group: group, date: date, ...Chart.convertObjectToFlattenColumns(data) - }); + }).then(x => this.repository.findOneOrFail(x.identifiers[0])); logger.info(`${this.name + (group ? `:${group}` : '')}: New commit created`);