Commit ed7a07f7 authored by Romain Courteaud's avatar Romain Courteaud

slapos_pdm: if not person can be found, search for everybody only

parent 8aafdbef
...@@ -61,9 +61,7 @@ if len(root_instance_list) != 0: ...@@ -61,9 +61,7 @@ if len(root_instance_list) != 0:
elif (compute_node.getPortalType() != 'Remote Node'): elif (compute_node.getPortalType() != 'Remote Node'):
return return
person = context.getDestinationSectionValue() person = context.getDestinationSectionValue(checked_permission='Access contents information')
if person is None:
return
# Search if the product with the same type # Search if the product with the same type
# XXX search only for the main node # XXX search only for the main node
...@@ -102,11 +100,12 @@ if len(allocation_cell_list) == 1: ...@@ -102,11 +100,12 @@ if len(allocation_cell_list) == 1:
return return
decision_title = 'A new upgrade is available for %s' % instance_tree.getTitle() decision_title = 'A new upgrade is available for %s' % instance_tree.getTitle()
person_relative_url = context.getDestinationSection()
upgrade_decision = portal.upgrade_decision_module.newContent( upgrade_decision = portal.upgrade_decision_module.newContent(
portal_type='Upgrade Decision', portal_type='Upgrade Decision',
title=decision_title, title=decision_title,
destination_section_value=person, destination_section=person_relative_url,
destination_decision_value=person, destination_decision=person_relative_url,
destination_project_value=instance_tree.getFollowUpValue(), destination_project_value=instance_tree.getFollowUpValue(),
resource_value=software_product, resource_value=software_product,
variation_category_list=allocation_cell_list[0].getVariationCategoryList(), variation_category_list=allocation_cell_list[0].getVariationCategoryList(),
......
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