Enable Part API to filter by active status

This commit is contained in:
Oliver Walters 2019-04-28 23:15:30 +10:00
parent 495d414d54
commit 1a66a12d57
2 changed files with 3 additions and 0 deletions

View File

@ -130,11 +130,13 @@ class PartList(generics.ListCreateAPIView):
] ]
filter_fields = [ filter_fields = [
'category',
'buildable', 'buildable',
'consumable', 'consumable',
'trackable', 'trackable',
'purchaseable', 'purchaseable',
'salable', 'salable',
'active',
] ]
ordering_fields = [ ordering_fields = [

View File

@ -70,6 +70,7 @@ class PartSerializer(serializers.ModelSerializer):
'consumable', 'consumable',
'trackable', 'trackable',
'salable', 'salable',
'active',
] ]