Commit 8cf975dc authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: fixup searchAndActivate usage, to not conflict on the uid column

parent a28edf4e
...@@ -11,7 +11,9 @@ subscribed_uid_list = [x.uid for x in portal.portal_catalog( ...@@ -11,7 +11,9 @@ subscribed_uid_list = [x.uid for x in portal.portal_catalog(
sql_kw = {} sql_kw = {}
if subscribed_uid_list: if subscribed_uid_list:
sql_kw['uid'] = NegatedQuery(SimpleQuery(uid=subscribed_uid_list)) # Use 'catalog.uid', because searchAndActivate will use 'uid' to order the
# results and iterate other them
sql_kw['catalog.uid'] = NegatedQuery(SimpleQuery(uid=subscribed_uid_list))
portal.portal_catalog.searchAndActivate( portal.portal_catalog.searchAndActivate(
method_id='Item_createSubscriptionRequest', method_id='Item_createSubscriptionRequest',
portal_type=["Compute Node", "Instance Tree"], portal_type=["Compute Node", "Instance Tree"],
......
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