From baeeac984ef1b560a9319850ccba357098423908 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 8 Mar 2024 08:45:41 +0100 Subject: [PATCH] refs #7004 perf: city/nif validation --- .../supplier/back/methods/supplier/updateFiscalData.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/supplier/back/methods/supplier/updateFiscalData.js b/modules/supplier/back/methods/supplier/updateFiscalData.js index 4b2573dba..366b5c29e 100644 --- a/modules/supplier/back/methods/supplier/updateFiscalData.js +++ b/modules/supplier/back/methods/supplier/updateFiscalData.js @@ -13,7 +13,7 @@ module.exports = Self => { type: 'string' }, { arg: 'nif', - type: 'string' + type: 'any' }, { arg: 'account', type: 'any' @@ -37,7 +37,7 @@ module.exports = Self => { type: 'any' }, { arg: 'city', - type: 'string' + type: 'any' }, { arg: 'provinceFk', type: 'any' @@ -87,11 +87,11 @@ module.exports = Self => { } } - if (!city) { + if (city === null) { throw new UserError('The city cannot be empty' ); } - if (!nif) { + if (nif === null) { throw new UserError('The nif cannot be empty' ); }