[MERGE] forward port branch 8.0 up to ee846fb
This commit is contained in:
+2
-2
@@ -213,7 +213,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
|
||||
@@ -249,7 +249,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
|
||||
|
||||
Reference in New Issue
Block a user