From e1a8772af67819a43f739827f4ae67dea43e4b8f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 15 Aug 2020 21:24:01 +1000 Subject: [PATCH] Update serializers for SupplierPart --- InvenTree/company/serializers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/company/serializers.py b/InvenTree/company/serializers.py index 09f2b4dee8..baa618fb28 100644 --- a/InvenTree/company/serializers.py +++ b/InvenTree/company/serializers.py @@ -99,6 +99,10 @@ class SupplierPartSerializer(InvenTreeModelSerializer): if manufacturer_detail is not True: self.fields.pop('manufacturer_detail') + supplier = serializers.PrimaryKeyRelatedField(queryset=Company.objects.filter(is_supplier=True)) + + manufacturer = serializers.PrimaryKeyRelatedField(queryset=Company.objects.filter(is_manufacturer=True)) + class Meta: model = SupplierPart fields = [