From c57706ad279cc32da3e7f2140d6f3cc67d84cb3a Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 3 Nov 2022 17:50:39 +0100 Subject: [PATCH] Duh --- core/admin/mailu/internal/views/dovecot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/admin/mailu/internal/views/dovecot.py b/core/admin/mailu/internal/views/dovecot.py index 3df3839e..07fce5b2 100644 --- a/core/admin/mailu/internal/views/dovecot.py +++ b/core/admin/mailu/internal/views/dovecot.py @@ -5,6 +5,7 @@ from flask import current_app as app import flask import socket import os +import sqlalchemy.exc @internal.route("/dovecot/passdb/") def dovecot_passdb_dict(user_email): @@ -29,7 +30,7 @@ def dovecot_userdb_dict_list(): def dovecot_userdb_dict(user_email): try: quota = models.User.query.filter(models.User.email==user_email).with_entities(models.User.quota_bytes).one_or_none() or flask.abort(404) - except ValueError: + except sqlalchemy.exc.StatementError as exc: flask.abort(404) return flask.jsonify({ "quota_rule": f"*:bytes={quota[0]}"