Commit 47261cac authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: fixup bulletin?

parent e3264841
......@@ -19,13 +19,16 @@ note_list = portal.portal_catalog(
grouped_instance_list = portal.portal_catalog(
portal_type=['Software Instance', 'Slave Instance'],
group_by=['specialise_uid'],
aggregate__uid=[x.uid for x in compute_node.contentValues(portal_type='Compute Partition')]
aggregate__uid=[x.getUid() for x in compute_node.contentValues(portal_type='Compute Partition')]
)
context.log('grouped_instance_tree_uid_list', [x.getSpecialiseUid() for x in grouped_instance_list])
grouped_instance_tree_list = portal.portal_catalog(
portal_type='Instance Tree',
group_by=['destination_section_uid'],
# group_by=['destination_section_uid'],
uid=[x.getSpecialiseUid() for x in grouped_instance_list]
)
customer_list = [x.getDestinationSectionValue() for x in grouped_instance_tree_list]
customer_uid_list = [x.getUid() for x in customer_list]
......@@ -36,7 +39,7 @@ for note in note_list:
# Search existing ones
acknowledgement_customer_uid_list = [x.getDestinationUid() for x in portal.portal_catalog(
portal_type='Acknowledgement',
destination_uid=customer_uid_list,
destination__uid=customer_uid_list,
follow_up__uid=bulletin.getUid(),
causality__uid=note.getUid()
)]
......@@ -52,5 +55,5 @@ for note in note_list:
note.getResource(),
note.getTextContent(),
note.getContentType(),
destination=customer
destination=customer.getRelativeUrl()
)
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