Commit 8445f5ed authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Don't process shipping resource If Shopping Cart is None

parent d90f82c4
...@@ -190,6 +190,8 @@ ...@@ -190,6 +190,8 @@
Return selected shipping method from shopping cart\n Return selected shipping method from shopping cart\n
"""\n """\n
shopping_cart = context.SaleOrder_getShoppingCart()\n shopping_cart = context.SaleOrder_getShoppingCart()\n
if shopping_cart is None:\n
return None\n
shipping_method = getattr(shopping_cart, \'shipping_method\', None)\n shipping_method = getattr(shopping_cart, \'shipping_method\', None)\n
if shipping_method is not None:\n if shipping_method is not None:\n
return shipping_method.getResourceValue()\n return shipping_method.getResourceValue()\n
......
325 326
\ 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