From 177a8912365e787efd76adf7702581036529d637 Mon Sep 17 00:00:00 2001 From: Place Jean-Marie Date: Sat, 16 Oct 2021 07:10:55 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20v=C3=A9rification=20date=20d'expiration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/users.py b/app/views/users.py index d293f3bc0..98d14f303 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -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: