From 1a66a12d57e6d4a90d95ed68c4404a4d22ece6ab Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 28 Apr 2019 23:15:30 +1000 Subject: [PATCH] Enable Part API to filter by active status --- InvenTree/part/api.py | 2 ++ InvenTree/part/serializers.py | 1 + 2 files changed, 3 insertions(+) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 46a15cfc62..379c19c260 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -130,11 +130,13 @@ class PartList(generics.ListCreateAPIView): ] filter_fields = [ + 'category', 'buildable', 'consumable', 'trackable', 'purchaseable', 'salable', + 'active', ] ordering_fields = [ diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 0344e46fe7..c8130055b7 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -70,6 +70,7 @@ class PartSerializer(serializers.ModelSerializer): 'consumable', 'trackable', 'salable', + 'active', ]