[FIX] http: clear environment/caches on transaction rollback
Backport of 8423a0df34
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:
@@ -306,6 +306,7 @@ class WebRequest(object):
|
||||
# case, the request cursor is unusable. Rollback transaction to create a new one.
|
||||
if self._cr:
|
||||
self._cr.rollback()
|
||||
self.env.clear()
|
||||
return self.endpoint(*a, **kw)
|
||||
|
||||
if self.db:
|
||||
|
||||
Reference in New Issue
Block a user