[FIX] http: clear environment/caches on transaction rollback
Backport of 8423a0df3482567b0e2f77852dda14b80a029401 Clear the cache/environment in addition to rolling back the cursor, in order to retry the transaction with fresh data, not partially stale data.
This commit is contained in:
parent
a0366b3a66
commit
ac8b7e90b5
|
@ -306,6 +306,7 @@ class WebRequest(object):
|
||||||
# case, the request cursor is unusable. Rollback transaction to create a new one.
|
# case, the request cursor is unusable. Rollback transaction to create a new one.
|
||||||
if self._cr:
|
if self._cr:
|
||||||
self._cr.rollback()
|
self._cr.rollback()
|
||||||
|
self.env.clear()
|
||||||
return self.endpoint(*a, **kw)
|
return self.endpoint(*a, **kw)
|
||||||
|
|
||||||
if self.db:
|
if self.db:
|
||||||
|
|
Loading…
Reference in New Issue