mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Deltaco some dead code
This commit is contained in:
parent
5a9c19492b
commit
7de4ee80f1
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user