@ -1976,7 +1976,7 @@ class BaseModelSqlv2 {
public async afterDelete(data: any, _trx: any, req): Promise<void> {
// if (req?.headers?.['xc-gui']) {
const id = req?.params?.id;
Audit.insert({
await Audit.insert({
fk_model_id: this.model.id,
row_id: id,
op_type: AuditOperationTypes.DATA,
@ -218,6 +218,7 @@ function baseModelSqlTests() {
expect(deletedRow).to.be.undefined;
console.log('Delete record', await Audit.projectAuditList(project.id, {}));
const rowDeletedAudit = (await Audit.projectAuditList(project.id, {})).find((audit) => audit.op_sub_type === 'DELETE');
expect(rowDeletedAudit).to.include({
user: 'test@example.com',
@ -1860,7 +1860,7 @@ function tableTest() {
.expect(400);
if(!response.body.msg.includes("Column 'customer_id' cannot be null")){
console.log(response.body)
console.log('Delete list hm with existing ref row id with non nullable clause', response.body)
throw new Error('Wrong error message')
}
})