Commit 7b955402 authored by Alexandre Boeglin's avatar Alexandre Boeglin

do not attempt to divide the price by None or 0

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19833 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d8144842
...@@ -118,7 +118,8 @@ if base_price not in (None, \'\'):\n ...@@ -118,7 +118,8 @@ if base_price not in (None, \'\'):\n
\n \n
# Divide by the priced quantity\n # Divide by the priced quantity\n
priced_quantity = price_parameter_dict[\'priced_quantity\']\n priced_quantity = price_parameter_dict[\'priced_quantity\']\n
unit_base_price /= priced_quantity\n if priced_quantity not in (None, 0):\n
unit_base_price /= priced_quantity\n
\n \n
# Return result\n # Return result\n
return unit_base_price\n return unit_base_price\n
......
...@@ -118,7 +118,8 @@ if base_price not in (None, \'\'):\n ...@@ -118,7 +118,8 @@ if base_price not in (None, \'\'):\n
\n \n
# Divide by the priced quantity\n # Divide by the priced quantity\n
priced_quantity = price_parameter_dict[\'priced_quantity\']\n priced_quantity = price_parameter_dict[\'priced_quantity\']\n
unit_base_price /= priced_quantity\n if priced_quantity not in (None, 0):\n
unit_base_price /= priced_quantity\n
\n \n
# Return result\n # Return result\n
if unit_base_price is not None:\n if unit_base_price is not None:\n
......
189 190
\ 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