Commit 4eb18996 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: do not filter by destination_project__uid=None

It leads to always return nothing, as it does a join to the category table
parent 18d835c2
......@@ -75,17 +75,22 @@ while count > 0 and len(trade_condition_list) == 0:
count -= 1
count = 0
#raise NotImplementedError(order.getDestinationProjectUid())
trade_condition_list = context.portal_domains.searchPredicateList(
predicate_context, portal_type=trade_condition_portal_type,
validation_state='validated',
specialise__uid='%',
#source_project__uid=order.getSourceProjectUid(),
destination_project__uid=order.getDestinationProjectUid(),
filter_kw = {
'portal_type': trade_condition_portal_type,
'validation_state': 'validated',
'specialise__uid': '%',
#source_project__uid=order.getSourceProjectUid(),
}
if order.hasDestinationProject():
filter_kw['destination_project__uid'] = order.getDestinationProjectUid()
trade_condition_list = context.portal_domains.searchPredicateList(
predicate_context,
tested_base_category_list=tested_base_category_list,#[:count],
filter_method=filter_method,
sort_method=sort_method)
sort_method=sort_method, **filter_kw)
#raise NotImplementedError('trade cl %s' % str([(x, rank_method(x), x.getValidationState()) for x in trade_condition_list]))
......
......@@ -6,18 +6,18 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple/>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
......
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