[Erp5-report] r19321 - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 14 20:24:19 CET 2008
Author: yusei
Date: Thu Feb 14 20:24:19 2008
New Revision: 19321
URL: http://svn.erp5.org?rev=19321&view=rev
Log:
Improve wiki successor/predecessor.
Modified:
erp5/trunk/products/ERP5/Document/Document.py
Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=19321&r1=19320&r2=19321&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Thu Feb 14 20:24:19 2008
@@ -567,11 +567,7 @@
pass
reference_list = [r[1] for r in self.getSearchableReferenceList()]
- successor_list = self.Base_getImplicitSuccessorValueList(reference_list)
- # get unique latest (most relevant) versions
- temp_result = [r.getObject().getLatestVersionValue() for r in successor_list]
- result_dict = dict.fromkeys(temp_result)
- result = result_dict.keys()
+ result = self.Base_getImplicitSuccessorValueList(reference_list)
tv[cache_key] = result
return result
@@ -604,15 +600,7 @@
method = self._getTypeBasedMethod('getImplicitPredecessorValueList',
fallback_script_id = 'Base_getImplicitPredecessorValueList')
- lst = method()
- # make it unique first time (before getting lastversionvalue)
- di = dict.fromkeys([r.getObject() for r in lst])
- # then get latest version and make unique again
- di = dict.fromkeys([o.getLatestVersionValue()
- for o in di.keys()
- if getattr(o, 'getLatestVersionValue', None)])
- ref = self.getReference()
- result = [o for o in di.keys() if o.getReference() != ref] # every object has its own reference in SearchableText
+ result = method()
tv[cache_key] = result
return result
More information about the Erp5-report
mailing list