Filter PartAttachment API list by Part reference

This commit is contained in:
Oliver Walters 2021-01-08 08:43:00 +11:00
parent 5666db6b7a
commit 59bb5d15c8

View File

@ -182,6 +182,10 @@ class PartAttachmentList(generics.ListCreateAPIView, AttachmentMixin):
queryset = PartAttachment.objects.all()
serializer_class = part_serializers.PartAttachmentSerializer
filter_backends = [
DjangoFilterBackend,
]
filter_fields = [
'part',
]