Commit ded4d3ed authored by Sebastien Robin's avatar Sebastien Robin

fixed bug when there an empty list for the value of after_path and after_method_id


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4663 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dbf917d0
...@@ -472,20 +472,20 @@ class SQLDict(RAMDict): ...@@ -472,20 +472,20 @@ class SQLDict(RAMDict):
# Count number of occurances of method_id # Count number of occurances of method_id
if type(value) == type(''): if type(value) == type(''):
value = [value] value = [value]
result = activity_tool.SQLDict_validateMessageList(method_id=value, message_uid=None, path=None) if len(value)>0: # if empty list provided, the message is valid
# LOG('SQLDict._validate_after_method_id, method_id',0,value) result = activity_tool.SQLDict_validateMessageList(method_id=value, message_uid=None, path=None)
# LOG('SQLDict._validate_after_method_id, result[0].uid_count',0,result[0].uid_count) if result[0].uid_count > 0:
if result[0].uid_count > 0: return INVALID_ORDER
return INVALID_ORDER
return VALID return VALID
def _validate_after_path(self, activity_tool, message, value): def _validate_after_path(self, activity_tool, message, value):
# Count number of occurances of path # Count number of occurances of path
if type(value) == type(''): if type(value) == type(''):
value = [value] value = [value]
result = activity_tool.SQLDict_validateMessageList(method_id=None, message_uid=None, path=value) if len(value)>0: # if empty list provided, the message is valid
if result[0].uid_count > 0: result = activity_tool.SQLDict_validateMessageList(method_id=None, message_uid=None, path=value)
return INVALID_ORDER if result[0].uid_count > 0:
return INVALID_ORDER
return VALID return VALID
def _validate_after_message_uid(self, activity_tool, message, value): def _validate_after_message_uid(self, activity_tool, message, value):
......
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