refs #7004 perf: city/nif validation
This commit is contained in:
parent
05e3129d34
commit
baeeac984e
|
@ -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'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue