Commit 23ddb1c4 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Check if resource_portal_type is None as well.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2935 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c167ba1
...@@ -127,7 +127,7 @@ class DeliveryBuilder(XMLObject, Amount, Predicate): ...@@ -127,7 +127,7 @@ class DeliveryBuilder(XMLObject, Amount, Predicate):
kw['parent_uid'] = applied_rule.getUid() kw['parent_uid'] = applied_rule.getUid()
# XXX Add profile query # XXX Add profile query
# Add resource query # Add resource query
if self.resource_portal_type != '': if self.resource_portal_type not in ('', None):
kw['resourceType'] = self.resource_portal_type kw['resourceType'] = self.resource_portal_type
if self.simulation_select_method_id in ['', None]: if self.simulation_select_method_id in ['', None]:
...@@ -135,6 +135,7 @@ class DeliveryBuilder(XMLObject, Amount, Predicate): ...@@ -135,6 +135,7 @@ class DeliveryBuilder(XMLObject, Amount, Predicate):
movement_list = [x.getObject() for x in self.portal_catalog(**kw)] movement_list = [x.getObject() for x in self.portal_catalog(**kw)]
else: else:
select_method = getattr(self, self.simulation_select_method_id) select_method = getattr(self, self.simulation_select_method_id)
#LOG('selectMovement', 0, 'kw = %r, select_method = %r' % (kw, select_method))
movement_list = select_method(kw) movement_list = select_method(kw)
sql_query = select_method(kw, src__=1) sql_query = select_method(kw, src__=1)
......
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