summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-08-19 16:35:22 +0200
committerChristophe Simonis <chs@odoo.com>2016-08-19 16:35:22 +0200
commit58cbcbae318f613c0e8239fbcfea59d0c3c33612 (patch)
tree198a599e8a31516681cbafecc9323da60378472e
parentef1386a7d2060bac40a44fcc7d2dbc5841922dc8 (diff)
parent787a32bdaf37156a63a374e559d5fea3baa64fb3 (diff)
[MERGE] forward port branch saas-6 up to 787a32b
-rw-r--r--openerp/http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openerp/http.py b/openerp/http.py
index 5d85de44460..03e6c50fc52 100644
--- a/openerp/http.py
+++ b/openerp/http.py
@@ -210,7 +210,7 @@ class WebRequest(object):
to a database.
"""
if not self.db:
- return RuntimeError('request not bound to a database')
+ raise RuntimeError('request not bound to a database')
return openerp.api.Environment(self.cr, self.uid, self.context)
@lazy_property
@@ -246,7 +246,7 @@ class WebRequest(object):
# can not be a lazy_property because manual rollback in _call_function
# if already set (?)
if not self.db:
- return RuntimeError('request not bound to a database')
+ raise RuntimeError('request not bound to a database')
if not self._cr:
self._cr = self.registry.cursor()
return self._cr