From d3a2d55a7de2753eea1020eff58e2aea47712f83 Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Tue, 15 Oct 2024 10:49:06 -0300 Subject: [PATCH] new(core.gbapp): Timestamp fields are now default. --- packages/basic.gblib/services/KeywordsExpressions.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/basic.gblib/services/KeywordsExpressions.ts b/packages/basic.gblib/services/KeywordsExpressions.ts index 1336e4d5..64ad55f6 100644 --- a/packages/basic.gblib/services/KeywordsExpressions.ts +++ b/packages/basic.gblib/services/KeywordsExpressions.ts @@ -793,7 +793,7 @@ export class KeywordsExpressions { __${$1} = null } `; - } + } } ]; @@ -1336,13 +1336,14 @@ export class KeywordsExpressions { // Checks if it is a collection or series of params. return ` - if (Array.isArray(${fields[0]})){ - await sys.saveToStorageBatch({pid: pid, table: ${table}, rows:${fields[0]} }) - }else{ + if (Array.isArray(${fields[0]}) || typeof ${fields[0]} === 'object') { + await sys.saveToStorageBatch({pid: pid, table: ${table}, rows: ${fields[0]} }) + } else { await sys.saveToStorage({pid: pid, table: ${table}, fieldsValues: [${fieldsAsText}], fieldsNames: [${fieldsNames}] }) } ${fields[0].replace(/\`/g, '')} = null; `; + } ];