Browse Source

fix: include all columns in webhook payload when inserting from shared form

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6817/head
Pranav C 1 year ago
parent
commit
f17ab98196
  1. 30
      packages/nocodb/src/db/BaseModelSqlv2.ts

30
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -2612,30 +2612,30 @@ class BaseModelSqlv2 {
})) as any })) as any
).rows[0].id; ).rows[0].id;
} }
response = await this.readByPk( // response = await this.readByPk(
id, // id,
false, // false,
{}, // {},
{ ignoreView: true, getHiddenColumn: true }, // { ignoreView: true, getHiddenColumn: true },
); // );
} else { } else {
response = data; response = data;
} }
} else if (ai) { } else if (ai) {
response = await this.readByPk( id = Array.isArray(response)
Array.isArray(response)
? response?.[0]?.[ai.title] ? response?.[0]?.[ai.title]
: response?.[ai.title], : response?.[ai.title];
);
} }
response = Array.isArray(response) ? response[0] : response; rowId = id;
if (response)
rowId =
response[this.model.primaryKey.title] ||
response[this.model.primaryKey.column_name];
await Promise.all(postInsertOps.map((f) => f())); await Promise.all(postInsertOps.map((f) => f()));
const response = this.readByPk(rowId,
false,
{},
{ ignoreView: true, getHiddenColumn: true },
);
await this.afterInsert(response, this.dbDriver, cookie); await this.afterInsert(response, this.dbDriver, cookie);
return response; return response;

Loading…
Cancel
Save