Commit 08640f66 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Pass a list instead of iterating.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b070a73c
...@@ -317,12 +317,11 @@ class SQLDict(RAMDict): ...@@ -317,12 +317,11 @@ 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]
for method_id in value: result = activity_tool.SQLDict_validateMessageList(method_id=value, message_uid=None, path=None)
result = activity_tool.SQLDict_validateMessageList(method_id=method_id, message_uid=None, path=None) LOG('SQLDict._validate_after_method_id, method_id',0,value)
LOG('SQLDict._validate_after_method_id, method_id',0,method_id) LOG('SQLDict._validate_after_method_id, result[0].uid_count',0,result[0].uid_count)
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):
......
...@@ -17,6 +17,12 @@ FROM ...@@ -17,6 +17,12 @@ FROM
message message
WHERE WHERE
processing_node >= -1 processing_node >= -1
<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"> </dtml-if> <dtml-if method_id>
AND (
<dtml-in method_id>
method_id = <dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else> OR </dtml-if>
</dtml-in>
)
</dtml-if>
<dtml-if message_uid>AND uid = <dtml-sqlvar message_uid type="int"> </dtml-if> <dtml-if message_uid>AND uid = <dtml-sqlvar message_uid type="int"> </dtml-if>
<dtml-if path>AND path = <dtml-sqlvar path type="string"></dtml-if> <dtml-if path>AND path = <dtml-sqlvar path type="string"></dtml-if>
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