mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
handeling data in an inheritable way
This commit is contained in:
parent
c775c4611f
commit
ae01503a9e
@ -2067,10 +2067,14 @@ class PartPricing(AjaxView):
|
|||||||
# TODO - How to handle pricing in different currencies?
|
# TODO - How to handle pricing in different currencies?
|
||||||
currency = None
|
currency = None
|
||||||
|
|
||||||
|
# check if data is set
|
||||||
|
try:
|
||||||
|
data = self.data
|
||||||
|
except Exception as _e:
|
||||||
|
data = {}
|
||||||
|
|
||||||
# Always mark the form as 'invalid' (the user may wish to keep getting pricing data)
|
# Always mark the form as 'invalid' (the user may wish to keep getting pricing data)
|
||||||
data = {
|
data['form_valid'] = False
|
||||||
'form_valid': False,
|
|
||||||
}
|
|
||||||
|
|
||||||
return self.renderJsonResponse(request, form, data=data, context=self.get_pricing(quantity, currency))
|
return self.renderJsonResponse(request, form, data=data, context=self.get_pricing(quantity, currency))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user