Commit d2197ec3 authored by Sebastien Robin's avatar Sebastien Robin

clear the list of sql string at the beginning of a transaction, so we do not...

clear the list of sql string at the beginning of a transaction, so we do not execute again and again previous sql queries

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11895 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 711265ea
...@@ -119,6 +119,10 @@ class DeferredDB(DB): ...@@ -119,6 +119,10 @@ class DeferredDB(DB):
from thread import get_ident from thread import get_ident
self._tlock.acquire() self._tlock.acquire()
self._tthread = get_ident() self._tthread = get_ident()
# The Deferred DB instance is sometimes used for several
# transactions, so it is required to clear the sql_string_list
# each time a transaction starts
self.sql_string_list = []
def _finish(self, *ignored): def _finish(self, *ignored):
from thread import get_ident from thread import get_ident
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment