Commit 5fbb093e authored by Łukasz Nowak's avatar Łukasz Nowak

Catch Unauthorized too.

parent bf37d075
......@@ -51,6 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from zExceptions import Unauthorized\n
portal = context.getPortalObject()\n
setup_service_relative_url = portal.portal_preferences.getPreferredInstanceSetupResource()\n
for sale_order_line in portal.portal_catalog(\n
......@@ -65,6 +66,9 @@ for sale_order_line in portal.portal_catalog(\n
except ValidationFailed:\n
# order not ready yet\n
continue\n
except Unauthorized:\n
# user has bad balance\n
continue\n
else:\n
try:\n
sale_order.confirm()\n
......
543
\ No newline at end of file
544
\ 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