Commit 59cc5dfa authored by wenjie.zheng's avatar wenjie.zheng

Worklist.py: causality state getter returns an empty string instead of None...

Worklist.py: causality state getter returns an empty string instead of None when it is not definded.
parent 76b8edc0
......@@ -133,6 +133,7 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
""" return value of matched keys"""
#self.var_matches = {}
matches = None
matches_ref_list = []
if id == 'portal_type':
v = ''.join(self.matched_portal_type)
if tales_re.match(v).group(1):
......@@ -142,19 +143,18 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
matches = tuple(v)
elif id == 'validation_state':
matches_id_list = self.getMatchedValidationStateList()
matches_ref_list = []
for state_id in matches_id_list:
matches_ref_list.append(self.getParent()._getOb(state_id).getReference())
matches = tuple(matches_ref_list)
elif id == 'simulation_state':
matches_id_list = self.getMatchedSimulationStateList()
matches_ref_list = []
for state_id in matches_id_list:
matches_ref_list.append(self.getParent()._getOb(state_id).getReference())
matches = tuple(matches_ref_list)
elif id == 'causality_state':
matches_id = self.getMatchedCausalityState()
matches_ref_list = []
if matches_id is None:
matches_id = ''
matches_ref_list.append(matches_id)
matches = tuple(matches_ref_list)
else:
......
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