From 73b1f1875907a732076bfc336a651294b4207af1 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 19 Sep 2019 08:58:42 +0200 Subject: [PATCH] Fixed production errors #1699 --- README.md | 2 +- db/dump/fixtures.sql | 3 ++- modules/client/back/models/client.js | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89090bc2e..ae3d01f1d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ext install dbaeumer.vscode-eslint You will need to install globally the following items. ``` -# npm install -g karma-cli gulp-cli nodemon +# npm install -g jest gulp-cli nodemon ``` ## Linux Only Prerequisites diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index f390ba904..f701c4121 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -580,7 +580,8 @@ INSERT INTO `vn`.`itemCategory`(`id`, `name`, `display`, `color`, `icon`) (4, 'Handmade', 1, NULL, 'icon-handmade'), (5, 'Artificial', 1, NULL, 'icon-artificial'), (6, 'Green', 1, NULL, 'icon-greenery'), - (7, 'Accessories', 1, NULL, 'icon-accessory'); + (7, 'Accessories', 1, NULL, 'icon-accessory'), + (8, 'Fruit', 1, NULL, 'icon-fruit'); INSERT INTO `vn`.`itemType`(`id`, `code`, `name`, `categoryFk`, `life`,`workerFk`, `isPackaging`) VALUES diff --git a/modules/client/back/models/client.js b/modules/client/back/models/client.js index a5536c76e..38d12587b 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -108,6 +108,8 @@ module.exports = Self => { }); function cannotHaveET(err) { + if (!this.fi) return; + let tin = this.fi.toUpperCase(); let cannotHaveET = /^[A-B]/.test(tin);