forked from ScoDoc/ScoDoc
Fix: formulaire creation étudiant (date naissance vide)
This commit is contained in:
parent
3e43495831
commit
d51a47b71a
@ -1367,7 +1367,9 @@ def etudident_edit_form():
|
|||||||
|
|
||||||
|
|
||||||
def _validate_date_naissance(val: str, field) -> bool:
|
def _validate_date_naissance(val: str, field) -> bool:
|
||||||
"vrai si date saisie valide"
|
"vrai si date saisie valide (peut être vide)"
|
||||||
|
if not val:
|
||||||
|
return True
|
||||||
try:
|
try:
|
||||||
date_naissance = scu.convert_fr_date(val)
|
date_naissance = scu.convert_fr_date(val)
|
||||||
except ScoValueError:
|
except ScoValueError:
|
||||||
@ -1788,7 +1790,11 @@ def _etudident_create_or_edit_form(edit):
|
|||||||
+ homonyms_html
|
+ homonyms_html
|
||||||
+ F
|
+ F
|
||||||
)
|
)
|
||||||
tf[2]["date_naissance"] = scu.convert_fr_date(tf[2]["date_naissance"])
|
tf[2]["date_naissance"] = (
|
||||||
|
scu.convert_fr_date(tf[2]["date_naissance"])
|
||||||
|
if tf[2]["date_naissance"]
|
||||||
|
else None
|
||||||
|
)
|
||||||
if not edit:
|
if not edit:
|
||||||
etud = sco_etud.create_etud(cnx, args=tf[2])
|
etud = sco_etud.create_etud(cnx, args=tf[2])
|
||||||
etudid = etud["etudid"]
|
etudid = etud["etudid"]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.6.965"
|
SCOVERSION = "9.6.966"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user