Skip to content

Commit

Permalink
Merge pull request #493 from zhuyuanmao/add-choice
Browse files Browse the repository at this point in the history
Restrict new org type
  • Loading branch information
yeasy authored Nov 5, 2022
2 parents 69f38d9 + f39ad3d commit fc03dab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/api-engine/api/routes/channel/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fc03dab

Please sign in to comment.