mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes
This commit is contained in:
parent
5744796506
commit
baa6283d20
@ -91,6 +91,14 @@ class ManufacturerPartFilter(rest_filters.FilterSet):
|
|||||||
Custom API filters for the ManufacturerPart list endpoint.
|
Custom API filters for the ManufacturerPart list endpoint.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = ManufacturerPart
|
||||||
|
fields = [
|
||||||
|
'manufacturer',
|
||||||
|
'MPN',
|
||||||
|
'part',
|
||||||
|
]
|
||||||
|
|
||||||
# Filter by 'active' status of linked part
|
# Filter by 'active' status of linked part
|
||||||
active = rest_filters.BooleanFilter(field_name='part__active')
|
active = rest_filters.BooleanFilter(field_name='part__active')
|
||||||
|
|
||||||
@ -133,12 +141,6 @@ class ManufacturerPartList(generics.ListCreateAPIView):
|
|||||||
filters.OrderingFilter,
|
filters.OrderingFilter,
|
||||||
]
|
]
|
||||||
|
|
||||||
filter_fields = [
|
|
||||||
'MPN',
|
|
||||||
'manufacturer',
|
|
||||||
'part',
|
|
||||||
]
|
|
||||||
|
|
||||||
search_fields = [
|
search_fields = [
|
||||||
'manufacturer__name',
|
'manufacturer__name',
|
||||||
'description',
|
'description',
|
||||||
|
Loading…
Reference in New Issue
Block a user