From 85b8984446d0f284e3ce7aae5a90a76cbd5d9b1d Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 26 Sep 2022 11:54:53 +0530 Subject: [PATCH] fix(nocodb): Added project id population logic inside inserAudit in method of Audit --- packages/nocodb/src/lib/models/Audit.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/nocodb/src/lib/models/Audit.ts b/packages/nocodb/src/lib/models/Audit.ts index 62a525de14..e0127225a2 100644 --- a/packages/nocodb/src/lib/models/Audit.ts +++ b/packages/nocodb/src/lib/models/Audit.ts @@ -44,13 +44,13 @@ export default class Audit implements AuditType { forceAwait: process.env['TEST'] === 'true', } ) { - if (!audit.project_id && audit.fk_model_id) { - audit.project_id = ( - await Model.getByIdOrName({ id: audit.fk_model_id }, ncMeta) - ).project_id; - } - const insertAudit = async () => { + if (!audit.project_id && audit.fk_model_id) { + audit.project_id = ( + await Model.getByIdOrName({ id: audit.fk_model_id }, ncMeta) + ).project_id; + } + return await ncMeta.metaInsert2(null, null, MetaTable.AUDIT, { user: audit.user, ip: audit.ip,