diff --git a/src/api-engine/api/routes/channel/serializers.py b/src/api-engine/api/routes/channel/serializers.py index ebc3eba21..165c12b65 100644 --- a/src/api-engine/api/routes/channel/serializers.py +++ b/src/api-engine/api/routes/channel/serializers.py @@ -29,12 +29,18 @@ class ChannelIDSerializer(serializers.Serializer): id = serializers.UUIDField(help_text="Channel ID") +ORG_CHOICES = ( + ("Application", "Application"), + ("Orderer", "Orderer"), +) + + class ChannelUpdateSerializer(serializers.Serializer): msp_id = serializers.CharField( max_length=128, help_text="MSP ID of Organization") data = serializers.FileField(help_text="Channel config file") - org_type = serializers.CharField( - max_length=24, help_text="Organization type") + org_type = serializers.ChoiceField( + help_text="Organization type", choices=ORG_CHOICES) class ChannelOrgListSerializer(serializers.Serializer):