[FIX] dispatch: creating a registry can raise an operational error

If you try to create a registry of a database, an exception can be
raised if the database does not exist. This may happen if you just
drop a database.
This commit is contained in:
Simon Lejeune
2016-09-21 14:40:05 +02:00
parent 6780597f2d
commit fbd4a2c73e
+1 -1
View File
@@ -1450,8 +1450,8 @@ class Root(object):
with request:
db = request.session.db
if db:
odoo.registry(db).check_signaling()
try:
odoo.registry(db).check_signaling()
with odoo.tools.mute_logger('odoo.sql_db'):
ir_http = request.registry['ir.http']
except (AttributeError, psycopg2.OperationalError, psycopg2.ProgrammingError):