[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:
+1
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user