forked from ScoDoc/ScoDoc
ajout vérification date d'expiration
This commit is contained in:
parent
9c50b58d5f
commit
177a891236
@ -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