From 59bb5d15c88728d698b348a9249e2619b891a8cd Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 8 Jan 2021 08:43:00 +1100 Subject: [PATCH] Filter PartAttachment API list by Part reference --- InvenTree/part/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index b479575a35..3c848620d5 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -182,6 +182,10 @@ class PartAttachmentList(generics.ListCreateAPIView, AttachmentMixin): queryset = PartAttachment.objects.all() serializer_class = part_serializers.PartAttachmentSerializer + filter_backends = [ + DjangoFilterBackend, + ] + filter_fields = [ 'part', ]