mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Only calculate pricing data if required
This commit is contained in:
parent
525b6d399d
commit
722e947745
@ -395,10 +395,11 @@ class PartDetail(InvenTreeRoleMixin, DetailView):
|
||||
context.update(**ctx)
|
||||
|
||||
# Pricing information
|
||||
ctx = self.get_pricing(self.get_quantity())
|
||||
ctx['form'] = self.form_class(initial=self.get_initials())
|
||||
if InvenTreeSetting.get_setting('PART_SHOW_PRICE_HISTORY', False):
|
||||
ctx = self.get_pricing(self.get_quantity())
|
||||
ctx['form'] = self.form_class(initial=self.get_initials())
|
||||
|
||||
context.update(ctx)
|
||||
context.update(ctx)
|
||||
|
||||
return context
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user