Skip to content
Snippets Groups Projects
Unverified Commit 3af761b4 authored by Fabien Meghazi's avatar Fabien Meghazi Committed by Olivier Dony
Browse files

[FIX] db: do not log an error if access to pg_database is denied

Do not log a misleading "bad query" for cases where pg_database is not
accessible.
parent 3a387ef2
Branches
Tags
No related merge requests found
......@@ -92,7 +92,7 @@ def _create_empty_database(name):
with closing(db.cursor()) as cr:
chosen_template = odoo.tools.config['db_template']
cr.execute("SELECT datname FROM pg_database WHERE datname = %s",
(name,))
(name,), log_exceptions=False)
if cr.fetchall():
raise DatabaseExists("database %r already exists!" % (name,))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment