mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 15:15:42 +00:00 
			
		
		
		
	Catch potential error when refreshing part pricing (#4154)
This commit is contained in:
		@@ -2374,7 +2374,10 @@ class PartPricing(models.Model):
 | 
			
		||||
        """Recalculate all cost data for the referenced Part instance"""
 | 
			
		||||
 | 
			
		||||
        if self.pk is not None:
 | 
			
		||||
            try:
 | 
			
		||||
                self.refresh_from_db()
 | 
			
		||||
            except PartPricing.DoesNotExist:
 | 
			
		||||
                pass
 | 
			
		||||
 | 
			
		||||
        self.update_bom_cost(save=False)
 | 
			
		||||
        self.update_purchase_cost(save=False)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user