|
|
@ -78,12 +78,7 @@ export default class Audit implements AuditType { |
|
|
|
|
|
|
|
|
|
|
|
// Will only await for Audit insertion if `forceAwait` is true, which will be true in test environment by default
|
|
|
|
// Will only await for Audit insertion if `forceAwait` is true, which will be true in test environment by default
|
|
|
|
public static async insert( |
|
|
|
public static async insert( |
|
|
|
audit: Partial< |
|
|
|
audit: Partial<Audit>, |
|
|
|
Audit & { |
|
|
|
|
|
|
|
created_at?; |
|
|
|
|
|
|
|
updated_at?; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
>, |
|
|
|
|
|
|
|
ncMeta = Noco.ncMeta, |
|
|
|
ncMeta = Noco.ncMeta, |
|
|
|
{ forceAwait }: { forceAwait: boolean } = { |
|
|
|
{ forceAwait }: { forceAwait: boolean } = { |
|
|
|
forceAwait: process.env['TEST'] === 'true', |
|
|
|
forceAwait: process.env['TEST'] === 'true', |
|
|
@ -105,8 +100,6 @@ export default class Audit implements AuditType { |
|
|
|
'status', |
|
|
|
'status', |
|
|
|
'description', |
|
|
|
'description', |
|
|
|
'details', |
|
|
|
'details', |
|
|
|
'created_at', |
|
|
|
|
|
|
|
'updated_at', |
|
|
|
|
|
|
|
]); |
|
|
|
]); |
|
|
|
if (!insertObj.project_id && insertObj.fk_model_id) { |
|
|
|
if (!insertObj.project_id && insertObj.fk_model_id) { |
|
|
|
insertObj.project_id = ( |
|
|
|
insertObj.project_id = ( |
|
|
|