1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-24 18:47:23 +00:00

Prevent double error message logging in case error in delete user

This commit is contained in:
Ozzie Isaacs 2023-02-27 19:27:48 +01:00
parent 942bcff5c4
commit 3cf778b591

View File

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