Projet

Général

Profil

0001-atos_genesys-check-dob-is-1900-44345.patch

Benjamin Dauvergne, 22 juin 2020 22:12

Télécharger (1,03 ko)

Voir les différences:

Subject: [PATCH] atos_genesys: check dob is >= 1900 (#44345)

 passerelle/apps/atos_genesys/models.py | 2 ++
 1 file changed, 2 insertions(+)
passerelle/apps/atos_genesys/models.py
368 368
            date_of_birth = datetime.datetime.strptime(date_of_birth, '%Y-%m-%d').date()
369 369
        except (ValueError, TypeError):
370 370
            raise APIError('invalid date_of_birth: %r' % date_of_birth)
371
        if date_of_birth.year < 1900:
372
            raise APIError('date_of_birth must be >= 1900')
371 373
        if commune_naissance:
372 374
            # convert commune_naissance to ASCII
373 375
            commune_naissance = to_ascii(commune_naissance).lower()
374
-