atos_genesys: check year of birth is >= 1900 (#44345)
This commit is contained in:
parent
31cd22bab5
commit
78e46ed475
|
@ -368,6 +368,8 @@ class Resource(BaseResource, HTTPResource):
|
|||
date_of_birth = datetime.datetime.strptime(date_of_birth, '%Y-%m-%d').date()
|
||||
except (ValueError, TypeError):
|
||||
raise APIError('invalid date_of_birth: %r' % date_of_birth)
|
||||
if date_of_birth.year < 1900:
|
||||
raise APIError('date_of_birth must be >= 1900')
|
||||
if commune_naissance:
|
||||
# convert commune_naissance to ASCII
|
||||
commune_naissance = to_ascii(commune_naissance).lower()
|
||||
|
|
Loading…
Reference in New Issue