mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Fix div-by-zero for part pricing
This commit is contained in:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user