Update serializers for SupplierPart

This commit is contained in:
Oliver Walters 2020-08-15 21:24:01 +10:00
parent d34383e842
commit e1a8772af6

View File

@ -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 = [