mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Only calculate pricing data if required
This commit is contained in:
		@@ -395,10 +395,11 @@ class PartDetail(InvenTreeRoleMixin, DetailView):
 | 
				
			|||||||
        context.update(**ctx)
 | 
					        context.update(**ctx)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Pricing information
 | 
					        # Pricing information
 | 
				
			||||||
        ctx = self.get_pricing(self.get_quantity())
 | 
					        if InvenTreeSetting.get_setting('PART_SHOW_PRICE_HISTORY', False):
 | 
				
			||||||
        ctx['form'] = self.form_class(initial=self.get_initials())
 | 
					            ctx = self.get_pricing(self.get_quantity())
 | 
				
			||||||
 | 
					            ctx['form'] = self.form_class(initial=self.get_initials())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        context.update(ctx)
 | 
					            context.update(ctx)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return context
 | 
					        return context
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user