Commit ba4f30a6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use set.intersection because trade phase of a business path can be a list.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31146 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 59490eba
......@@ -88,8 +88,9 @@ class BusinessProcess(Path, XMLObject):
result = []
if len(trade_phase) == 0:
return self.objectValues(portal_type="Business Path")
trade_phase = set(trade_phase)
for document in self.objectValues(portal_type="Business Path"):
if document.getTradePhase() in trade_phase:
if trade_phase.intersection(document.getTradePhaseList()):
result.append(document)
return result
......
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