From 7d80c259aa03396c98a5894bb24fe426884945de Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sat, 24 Aug 2024 00:50:32 -0300 Subject: [PATCH] fix(all): New templates. --- packages/basic.gblib/services/SystemKeywords.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/basic.gblib/services/SystemKeywords.ts b/packages/basic.gblib/services/SystemKeywords.ts index 9f7d66aa..e4b4960e 100644 --- a/packages/basic.gblib/services/SystemKeywords.ts +++ b/packages/basic.gblib/services/SystemKeywords.ts @@ -756,9 +756,6 @@ export class SystemKeywords { let rowsDest = []; rows.forEach(row => { - if (GBUtil.hasSubObject(row)) { - row = this.flattenJSON(row); - } let dst = {}; let i = 0; @@ -767,6 +764,11 @@ export class SystemKeywords { dst[field] = row[column]; i++; }); + + if (GBUtil.hasSubObject(dst)) { + dst = this.flattenJSON(dst); + } + rowsDest.push(dst); dst = null; }); @@ -801,8 +803,9 @@ export class SystemKeywords { const definition = this.getTableFromName(table, min); - let dst = {}; // Uppercases fields. + + let dst = {}; let i = 0; Object.keys(fieldsValues).forEach(fieldSrc => { const field = fieldsNames[i].charAt(0).toUpperCase() + fieldsNames[i].slice(1);