mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Deltaco some dead code
This commit is contained in:
		@@ -60,15 +60,6 @@ class StockItemSerializer(serializers.ModelSerializer):
 | 
				
			|||||||
    part_detail = PartBriefSerializer(source='part', many=False, read_only=True)
 | 
					    part_detail = PartBriefSerializer(source='part', many=False, read_only=True)
 | 
				
			||||||
    location_detail = LocationBriefSerializer(source='location', many=False, read_only=True)
 | 
					    location_detail = LocationBriefSerializer(source='location', many=False, read_only=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					 | 
				
			||||||
    def setup_eager_loading(queryset):
 | 
					 | 
				
			||||||
        queryset = queryset.prefetch_related('part')
 | 
					 | 
				
			||||||
        queryset = queryset.prefetch_related('part__stock_items')
 | 
					 | 
				
			||||||
        queryset = queryset.prefetch_related('part__category')
 | 
					 | 
				
			||||||
        queryset = queryset.prefetch_related('location')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return queryset
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def __init__(self, *args, **kwargs):
 | 
					    def __init__(self, *args, **kwargs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        part_detail = kwargs.pop('part_detail', False)
 | 
					        part_detail = kwargs.pop('part_detail', False)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user