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

Use more precise exception.

parent aa55cd53
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>from zExceptions import Unauthorized\n
portal = context.getPortalObject()\n
\n \n
order = state_change[\'object\']\n order = state_change[\'object\']\n
\n \n
...@@ -63,7 +64,7 @@ for order_line in order.getMovementList():\n ...@@ -63,7 +64,7 @@ for order_line in order.getMovementList():\n
computer_partition = order_line.getAggregateValue(portal_type="Computer Partition")\n computer_partition = order_line.getAggregateValue(portal_type="Computer Partition")\n
if computer_partition is None:\n if computer_partition is None:\n
if not order.Delivery_isDestinationSectionAllowedToRequest():\n if not order.Delivery_isDestinationSectionAllowedToRequest():\n
raise ValueError(\'Request disallowed\')\n raise Unauthorized(\'Request disallowed\')\n
software_release = order_line.getAggregateValue(portal_type="Software Release")\n software_release = order_line.getAggregateValue(portal_type="Software Release")\n
software_instance = order_line.getAggregateValue(portal_type=instance_portal_type_list)\n software_instance = order_line.getAggregateValue(portal_type=instance_portal_type_list)\n
\n \n
......
154 155
\ 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