Fix: API user edit date_expiration

Corrige l'erreur empêchant la modification de la date d'expiration d'un
utilisateur via l'API.
This commit is contained in:
Lyanis Souidi 2024-11-19 20:48:17 +01:00
parent 901367e496
commit 685c5eb27b

View File

@ -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
)