ajout vérification date d'expiration

This commit is contained in:
Jean-Marie Place 2021-10-16 07:10:55 +02:00
parent 9c50b58d5f
commit 177a891236

View File

@ -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"], "%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:
vals["date_expiration"] = None
except ValueError: