Commit 4d6e0b1a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

if trade_phase is empty, it should mean 'no matched business paths'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34485 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 43aec948
......@@ -86,10 +86,10 @@ class BusinessProcess(Path, XMLObject):
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 \
......
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