diff --git a/modules/invoiceIn/back/models/invoiceInVehicle.js b/modules/invoiceIn/back/models/invoiceInVehicle.js deleted file mode 100644 index 7fa780142..000000000 --- a/modules/invoiceIn/back/models/invoiceInVehicle.js +++ /dev/null @@ -1,10 +0,0 @@ -let UserError = require('vn-loopback/util/user-error'); - -module.exports = Self => { - Self.rewriteDbError(function(err) { - console.log(err); - if (err.code === 'ER_ROW_IS_REFERENCED_2') - return new UserError(`This invoice has a linked vehicle.`); - return err; - }); -};