mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Disable prefetch on part when saving stock items (#6051)
Contributes to #6013
This commit is contained in:
		@@ -779,6 +779,7 @@ class StockList(APIDownloadMixin, ListCreateDestroyAPIView):
 | 
				
			|||||||
            })
 | 
					            })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
 | 
					            Part.objects.prefetch_related(None)
 | 
				
			||||||
            part = Part.objects.get(pk=data.get('part', None))
 | 
					            part = Part.objects.get(pk=data.get('part', None))
 | 
				
			||||||
        except (ValueError, Part.DoesNotExist):
 | 
					        except (ValueError, Part.DoesNotExist):
 | 
				
			||||||
            raise ValidationError({
 | 
					            raise ValidationError({
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user