mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 18:01:14 +00:00
cleaner get function
This commit is contained in:
1 parent
90c207b935
commit
660a3f9410
1 file changed
+3
-3
@@ -2056,9 +2056,9 @@ class PartPricing(AjaxView):
|
|||||||
return {'quantity': self.get_quantity()}
|
return {'quantity': self.get_quantity()}
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
init = self.get_initials()
|
||||||
quantity = self.get_quantity()
|
qty = self.get_quantity()
|
||||||
return self.renderJsonResponse(request, self.form_class(initial={'quantity': quantity}), context=self.get_pricing(quantity))
|
return self.renderJsonResponse(request, self.form_class(initial=init), context=self.get_pricing(qty))
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user