diff options
Diffstat (limited to 'procurement/serializers.py')
-rw-r--r-- | procurement/serializers.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/procurement/serializers.py b/procurement/serializers.py index 1840837..0466402 100644 --- a/procurement/serializers.py +++ b/procurement/serializers.py @@ -1,8 +1,14 @@ from rest_framework import serializers -from procurement.models import Component, Supplier +from procurement.models import Component, Supplier, Representative +class RepresentativeSerializer(serializers.ModelSerializer): + class Meta: + model = Representative + exclude = ('created', 'updated', 'supplier', 'id') class SupplierSerializer(serializers.ModelSerializer): + representatives = RepresentativeSerializer(many=True, read_only=True) + class Meta: model = Supplier exclude = ('created', 'updated') |