misc: remove unnecessary parameter in SIRET regex validation (#71032)

This commit is contained in:
Frédéric Péters 2022-11-05 12:01:46 +01:00
parent f8f19e14b5
commit a461d29823
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ def validate_lun(value):
def validate_siret(value):
RegexValidator(r'^( *[0-9] *){14}$', _('SIRET number must contain 14 digits'), 'coin')(value)
RegexValidator(r'^( *[0-9] *){14}$', _('SIRET number must contain 14 digits'))(value)
value = only_digits(value)
if not validate_lun(value) or not validate_lun(value[:9]):
raise ValidationError(_('SIRET validation code does not match'))