Projet

Général

Profil

0001-misc-remove-unnecessary-parameter-in-SIRET-regex-val.patch

Frédéric Péters, 05 novembre 2022 12:53

Télécharger (1013 octets)

Voir les différences:

Subject: [PATCH] misc: remove unnecessary parameter in SIRET regex validation
 (#71032)

 src/authentic2/attribute_kinds.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/authentic2/attribute_kinds.py
400 400

  
401 401

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