fix: mioitem select_related bug
This commit is contained in:
parent
9ba83cc1fe
commit
ccc87a5a5c
|
@ -184,12 +184,12 @@ class MIOItemViewSet(ListModelMixin, BulkCreateModelMixin, BulkDestroyModelMixin
|
||||||
queryset = MIOItem.objects.all()
|
queryset = MIOItem.objects.all()
|
||||||
serializer_class = MIOItemSerializer
|
serializer_class = MIOItemSerializer
|
||||||
create_serializer_class = MIOItemCreateSerializer
|
create_serializer_class = MIOItemCreateSerializer
|
||||||
select_related_fields = ['warehouse', 'mio',
|
select_related_fields = ['warehouse', 'mio', 'material']
|
||||||
'material', 'mio__type']
|
|
||||||
filterset_fields = {
|
filterset_fields = {
|
||||||
"warehouse": ["exact"],
|
"warehouse": ["exact"],
|
||||||
"mio": ["exact"],
|
"mio": ["exact"],
|
||||||
"mio__state": ["exact"],
|
"mio__state": ["exact"],
|
||||||
|
"mio__type": ["exact", "in"],
|
||||||
"material": ["exact"],
|
"material": ["exact"],
|
||||||
"test_date": ["isnull", "exact"]
|
"test_date": ["isnull", "exact"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue