Commit ec9e8af8 authored by Jérome Perrin's avatar Jérome Perrin

Do not keep a _v_ reference to the brain on ZSQL Method

This was a problem when using a brain as a ZODB component because an old
version of the class and module was kept as the _v_ attribute. The problem was
when the components where reseted
parent 48b028ab
......@@ -235,11 +235,8 @@ def DA__call__(self, REQUEST=None, __ick__=None, src__=0, test__=0, **kw):
brain = getBrain(class_file_, class_name_)
# XXX remove this logging for performance
LOG(__name__, INFO, "Using special brain: %r\n" % (brain,))
elif hasattr(self, '_v_brain'):
# end patch:
brain=self._v_brain
else:
brain=self._v_brain=getBrain(self.class_file_, self.class_name_)
brain = getBrain(self.class_file_, self.class_name_)
if type(result) is type(''):
f=StringIO()
......
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