|
@@ -510,8 +510,8 @@ module.exports = app => {
|
|
|
};
|
|
|
newAuditors.push(na);
|
|
|
}
|
|
|
- const result = await transaction.insert(this.tableName, newAuditors);
|
|
|
- return result.affectedRows === auditors.length;
|
|
|
+ const result = newAuditors.length > 0 ? await transaction.insert(this.tableName, newAuditors) : null;
|
|
|
+ return result ? result.affectedRows === auditors.length : true;
|
|
|
}
|
|
|
|
|
|
async getAllAuditors(tenderId) {
|