mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 21:45:39 +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):
|
def get_pricing(self, quantity=1):
|
||||||
|
|
||||||
|
try:
|
||||||
|
quantity = int(quantity)
|
||||||
|
except ValueError:
|
||||||
|
quantity = 1
|
||||||
|
|
||||||
|
if quantity < 1:
|
||||||
|
quantity = 1
|
||||||
|
|
||||||
part = self.get_part()
|
part = self.get_part()
|
||||||
|
|
||||||
ctx = {
|
ctx = {
|
||||||
|
Reference in New Issue
Block a user