move vehicleInvoice
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-07-17 13:51:16 +02:00
parent f24aa2c801
commit 10e726c486
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.rewriteDbError(function(err) {
if (err.code === 'ER_ROW_IS_REFERENCED')
if (err.code === 'ER_ROW_IS_REFERENCED_2')
return new UserError(`This invoice has a linked vehicle.`);
return err;
});