[Erp5-report] r34485 kazuhiko - /erp5/trunk/products/ERP5/Document/BusinessProcess.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 13 11:02:10 CEST 2010
Author: kazuhiko
Date: Tue Apr 13 11:02:07 2010
New Revision: 34485
URL: http://svn.erp5.org?rev=34485&view=rev
Log:
if trade_phase is empty, it should mean 'no matched business paths'.
Modified:
erp5/trunk/products/ERP5/Document/BusinessProcess.py
Modified: erp5/trunk/products/ERP5/Document/BusinessProcess.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessProcess.py?rev=34485&r1=34484&r2=34485&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessProcess.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessProcess.py [utf8] Tue Apr 13 11:02:07 2010
@@ -86,10 +86,10 @@
elif not isinstance(trade_phase, (list, tuple)):
trade_phase = (trade_phase,)
result = []
+ if len(trade_phase) == 0:
+ return result
business_path_list = sorted(self.objectValues(portal_type="Business Path"),
key=lambda x:x.getIntIndex())
- if len(trade_phase) == 0:
- return business_path_list
trade_phase = set(trade_phase)
for document in business_path_list:
if trade_phase.intersection(document.getTradePhaseList()) and \
More information about the Erp5-report
mailing list