From 685c5eb27b3a1e71f78eaf04b0c0bb32f9cc7e07 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Tue, 19 Nov 2024 20:48:17 +0100 Subject: [PATCH] Fix: API user edit date_expiration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige l'erreur empĂȘchant la modification de la date d'expiration d'un utilisateur via l'API. --- app/auth/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/auth/models.py b/app/auth/models.py index 9126d6eda..c9cfa137f 100644 --- a/app/auth/models.py +++ b/app/auth/models.py @@ -350,7 +350,7 @@ class User(UserMixin, ScoDocModel): date_expiration = args.get("date_expiration") if isinstance(date_expiration, str): args["date_expiration"] = ( - datetime.datetime.fromisoformat(date_expiration) + datetime.fromisoformat(date_expiration) if date_expiration else None )