mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 13:58:47 +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):
|
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 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user