[Erp5-report] r29616 - /erp5/trunk/products/ERP5Type/patches/DA.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 13 20:45:07 CEST 2009
Author: leonardo
Date: Tue Oct 13 20:45:06 2009
New Revision: 29616
URL: http://svn.erp5.org?rev=29616&view=rev
Log:
remove ZClass references. We should resync this whole patch later. (Approved by jm)
Modified:
erp5/trunk/products/ERP5Type/patches/DA.py
Modified: erp5/trunk/products/ERP5Type/patches/DA.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DA.py?rev=29616&r1=29615&r2=29616&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DA.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/DA.py [utf8] Tue Oct 13 20:45:06 2009
@@ -22,7 +22,7 @@
from Shared.DC.ZRDB.Results import Results
from App.Extensions import getBrain
from AccessControl import getSecurityManager
-from Acquisition import aq_base
+from Acquisition import aq_base, aq_parent
from zLOG import LOG, INFO, ERROR
from string import find
from cStringIO import StringIO
@@ -187,11 +187,7 @@
except: raise DatabaseError, (
'%s is not connected to a database' % self.id)
- if hasattr(self, 'aq_parent'):
- p=self.aq_parent
- if self._isBeingAccessedAsZClassDefinedInstanceMethod():
- p=p.aq_parent
- else: p=None
+ p = aq_parent(self) # None if no aq_parent
argdata=self._argdata(REQUEST)
argdata['sql_delimiter']='\0'
@@ -230,16 +226,13 @@
else:
brain=self._v_brain=getBrain(self.class_file_, self.class_name_)
- zc=self._zclass
- if zc is not None: zc=zc._zclass_
-
if type(result) is type(''):
f=StringIO()
f.write(result)
f.seek(0)
- result=RDB.File(f,brain,p, zc)
+ result=RDB.File(f,brain,p)
else:
- result=Results(result, brain, p, zc)
+ result=Results(result, brain, p)
columns=result._searchable_result_columns()
if test__ and columns != self._col: self._col=columns
More information about the Erp5-report
mailing list