Commit ab08e8b4 authored by Łukasz Nowak's avatar Łukasz Nowak

Fallback to order line.

It will allow to index not instantiated Software Instances.
parent 21472928
...@@ -68,8 +68,9 @@ root_hosting_subscription = root_software_instance.getPredecessorRelatedValue(\n ...@@ -68,8 +68,9 @@ root_hosting_subscription = root_software_instance.getPredecessorRelatedValue(\n
# root Hosting Subscription.\n # root Hosting Subscription.\n
if root_hosting_subscription is None:\n if root_hosting_subscription is None:\n
# last resort: try to find root hosting subscription by packing list\n # last resort: try to find root hosting subscription by packing list\n
instance_setup_line = root_software_instance.Item_getInstancePackingListLine()\n order_line = root_software_instance.getAggregateRelatedValue(portal_type=\'Sale Order Line\')\n
root_hosting_subscription = instance_setup_line.getAggregateValue(portal_type=\'Hosting Subscription\')\n if order_line is not None:\n
root_hosting_subscription = order_line.getAggregateValue(portal_type=\'Hosting Subscription\')\n
if root_hosting_subscription is None:\n if root_hosting_subscription is None:\n
raise ConsistencyError(("Software instance %s has no hosting "\n raise ConsistencyError(("Software instance %s has no hosting "\n
"subscription as root.") % context.getReference())\n "subscription as root.") % context.getReference())\n
......
380 381
\ No newline at end of file \ No newline at end of file
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