diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-08-08 19:14:05 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-08-08 19:14:05 +0200 |
| commit | 40a82cdfda5e17b5712da46c412a75e0bd7883c3 (patch) | |
| tree | c969d557135dbf7c5367be4f80473808b99dbdec /odoo/http.py | |
| parent | e1b954f066a42fd9eb613861a517070f8ad35823 (diff) | |
[FIX] http: ensure registry is still bound to the request before using it
A user can be logged out during a request, loosing the database (and
thus registry) information.
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/http.py b/odoo/http.py index 338ebb30099..626f43bbea4 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -280,8 +280,9 @@ class WebRequest(object): if self._cr: if exc_type is None and not self._failed: self._cr.commit() - self.registry.signal_changes() - else: + if self.registry: + self.registry.signal_changes() + elif self.registry: self.registry.reset_changes() self._cr.close() # just to be sure no one tries to re-use the request |
