Commit fcec90a2 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Also check ComputerState for Subscription related Computers

parent 79ad93cd
portal = context.getPortalObject()
category_public = portal.restrictedTraverse("portal_categories/allocation_scope/open/public", None)
category_subscription = portal.restrictedTraverse("portal_categories/allocation_scope/open/subscription", None)
category_friend = portal.restrictedTraverse("portal_categories/allocation_scope/open/friend", None)
if category_public is not None:
portal.portal_catalog.searchAndActivate(
portal_type='Computer',
default_allocation_scope_uid=[category_public.getUid(), category_friend.getUid()],
default_allocation_scope_uid=[category_public.getUid(), category_friend.getUid(), category_subscription.getUid()],
validation_state="validated",
method_id='Computer_checkAndUpdateAllocationScope',
activate_kw={'tag': tag}
......
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