diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-06-13 18:18:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-06-13 18:18:17 +0200 |
| commit | a0a11fd5e2d78e5fc0d1503275adade570fe0d42 (patch) | |
| tree | 242f15169ef336a0fa3027a82a463b681aebe71d /odoo/http.py | |
| parent | dad9265d69a2e9ab21ea37cc15f7cd5f5d93afcf (diff) | |
| parent | 8a19a6a2a34d318d2c5b799a0e8e108fe04a097c (diff) | |
[MERGE] forward port branch saas-11.3 up to 8a19a6a2a34
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/odoo/http.py b/odoo/http.py index d5650e4ef9b..06c7bbe86f8 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -280,13 +280,15 @@ class WebRequest(object): _request_stack.pop() if self._cr: - if exc_type is None and not self._failed: - self._cr.commit() - if self.registry: - self.registry.signal_changes() - elif self.registry: - self.registry.reset_changes() - self._cr.close() + try: + if exc_type is None and not self._failed: + self._cr.commit() + if self.registry: + self.registry.signal_changes() + elif self.registry: + self.registry.reset_changes() + finally: + self._cr.close() # just to be sure no one tries to re-use the request self.disable_db = True self.uid = None |
