refs #6291 fix tinIsValid
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2024-01-03 13:44:20 +01:00
parent c77715d865
commit 3fbead7473
1 changed files with 1 additions and 2 deletions

View File

@ -36,9 +36,8 @@ module.exports = Self => {
};
const country = await Self.app.models.Country.findOne(filter);
const code = country ? country.code.toLowerCase() : null;
const countryCode = this.fi?.toLowerCase().substring(0, 2);
if (!this.fi || !validateTin(this.fi, code) || countryCode == code)
if (!this.fi || !validateTin(this.fi, code))
err();
done();
}