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

Catch Unauthorized too.

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