From 3cf778b591659b17fffed6665b2d4bfdf8aca160 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 27 Feb 2023 19:27:48 +0100 Subject: [PATCH] Prevent double error message logging in case error in delete user --- cps/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 0cf087ef..9d820008 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1940,10 +1940,10 @@ def _delete_user(content): log.info("User {} deleted".format(content.name)) return _("User '%(nick)s' deleted", nick=content.name) else: - log.warning(_("Can't delete Guest User")) + # log.warning(_("Can't delete Guest User")) raise Exception(_("Can't delete Guest User")) else: - log.warning("No admin user remaining, can't delete user") + # log.warning("No admin user remaining, can't delete user") raise Exception(_("No admin user remaining, can't delete user"))