[MERGE] forward port branch saas-6 up to 787a32b

This commit is contained in:
Christophe Simonis
2016-08-19 16:35:22 +02:00
+2 -2
View File
@@ -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