forked from ScoDoc/ScoDoc
Merge pull request 'ajout vérification date d'expiration' (#165) from jmplace/ScoDoc-Lille:controle_date_exp_anterieure into master
Reviewed-on: https://scodoc.org/git/viennet/ScoDoc/pulls/165
This commit is contained in:
commit
c05e763900
@ -436,6 +436,9 @@ def create_user_form(user_name=None, edit=0, all_roles=1):
|
|||||||
vals["date_expiration"] = datetime.datetime.strptime(
|
vals["date_expiration"] = datetime.datetime.strptime(
|
||||||
vals["date_expiration"], "%d/%m/%Y"
|
vals["date_expiration"], "%d/%m/%Y"
|
||||||
)
|
)
|
||||||
|
if vals["date_expiration"] < datetime.datetime.now():
|
||||||
|
H.append(tf_error_message("date expiration passée"))
|
||||||
|
return "\n".join(H) + "\n" + tf[1] + F
|
||||||
else:
|
else:
|
||||||
vals["date_expiration"] = None
|
vals["date_expiration"] = None
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
Reference in New Issue
Block a user