refs #7004 perf: city/nif validation

This commit is contained in:
Javier Segarra 2024-03-08 08:45:41 +01:00
parent 05e3129d34
commit baeeac984e
1 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ module.exports = Self => {
type: 'string' type: 'string'
}, { }, {
arg: 'nif', arg: 'nif',
type: 'string' type: 'any'
}, { }, {
arg: 'account', arg: 'account',
type: 'any' type: 'any'
@ -37,7 +37,7 @@ module.exports = Self => {
type: 'any' type: 'any'
}, { }, {
arg: 'city', arg: 'city',
type: 'string' type: 'any'
}, { }, {
arg: 'provinceFk', arg: 'provinceFk',
type: 'any' type: 'any'
@ -87,11 +87,11 @@ module.exports = Self => {
} }
} }
if (!city) { if (city === null) {
throw new UserError('The city cannot be empty' throw new UserError('The city cannot be empty'
); );
} }
if (!nif) { if (nif === null) {
throw new UserError('The nif cannot be empty' throw new UserError('The nif cannot be empty'
); );
} }