From c57574292dd60d76c8c305ad40960d65b5aa7ed3 Mon Sep 17 00:00:00 2001 From: "joel.clement" Date: Thu, 1 Jun 2023 12:16:39 +0200 Subject: [PATCH] error validation temp user return msg if exists --- backend/geonature/core/users/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/geonature/core/users/routes.py b/backend/geonature/core/users/routes.py index 1194fede50..125cb652cc 100644 --- a/backend/geonature/core/users/routes.py +++ b/backend/geonature/core/users/routes.py @@ -298,6 +298,8 @@ def confirmation(): ) if r.status_code != 200: + if r.json() and r.json().get('msg'): + return r.json().get('msg'), r.status_code return Response(r), r.status_code new_user = r.json()