From 512e100ac3daeb8570030fc44e53d6674e2dee33 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sat, 24 Aug 2024 01:10:36 -0300 Subject: [PATCH] fix(all): New templates. --- packages/basic.gblib/services/SystemKeywords.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/basic.gblib/services/SystemKeywords.ts b/packages/basic.gblib/services/SystemKeywords.ts index e4b4960e..d3de9924 100644 --- a/packages/basic.gblib/services/SystemKeywords.ts +++ b/packages/basic.gblib/services/SystemKeywords.ts @@ -746,7 +746,7 @@ export class SystemKeywords { */ public async saveToStorageBatch({ pid, table, rows }): Promise { const { min } = await DialogKeywords.getProcessInfo(pid); - GBLogEx.info(min, `SAVE '${table}' ${rows.length} row(s).`); + GBLogEx.info(min, `SAVE '${table}': ${rows.length} row(s). ${GBUtil.toYAML(rows)}`); if (rows.length === 0) { return; @@ -757,6 +757,10 @@ export class SystemKeywords { rows.forEach(row => { + if (GBUtil.hasSubObject(row)) { + row = this.flattenJSON(row); + } + let dst = {}; let i = 0; Object.keys(row).forEach(column => { @@ -764,11 +768,6 @@ export class SystemKeywords { dst[field] = row[column]; i++; }); - - if (GBUtil.hasSubObject(dst)) { - dst = this.flattenJSON(dst); - } - rowsDest.push(dst); dst = null; });