mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix div-by-zero for part pricing
This commit is contained in:
parent
2e2c51b271
commit
73041a3fe6
@ -567,6 +567,14 @@ class PartPricing(AjaxView):
|
||||
|
||||
def get_pricing(self, quantity=1):
|
||||
|
||||
try:
|
||||
quantity = int(quantity)
|
||||
except ValueError:
|
||||
quantity = 1
|
||||
|
||||
if quantity < 1:
|
||||
quantity = 1
|
||||
|
||||
part = self.get_part()
|
||||
|
||||
ctx = {
|
||||
|
Loading…
Reference in New Issue
Block a user