浏览代码

上报bug

laiguoran 4 年之前
父节点
当前提交
3a48ac703e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/material_audit.js

+ 1 - 1
app/service/material_audit.js

@@ -240,7 +240,7 @@ module.exports = app => {
                     };
                     mbhList.push(newMbh);
                 }
-                await transaction.insert(this.ctx.service.materialBillsHistory.tableName, mbhList);
+                if(mbhList.length !== 0) await transaction.insert(this.ctx.service.materialBillsHistory.tableName, mbhList);
 
                 const materialExponentData = await this.ctx.service.materialExponent.getAllDataByCondition({ where: { tid: this.ctx.tender.id } });
                 const mehList = [];