Skip to content

Commit 54d220c

Browse files
committed
feat(serializers): make choice fields optional in ProductSerializer
1 parent 5048b9d commit 54d220c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

dojo/api_v2/serializers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,10 +2103,10 @@ class ProductSerializer(serializers.ModelSerializer):
21032103
findings_count = serializers.SerializerMethodField()
21042104
findings_list = serializers.SerializerMethodField()
21052105

2106-
business_criticality = serializers.ChoiceField(choices=Product.BUSINESS_CRITICALITY_CHOICES, allow_blank=True, allow_null=True)
2107-
platform = serializers.ChoiceField(choices=Product.PLATFORM_CHOICES, allow_blank=True, allow_null=True)
2108-
lifecycle = serializers.ChoiceField(choices=Product.LIFECYCLE_CHOICES, allow_blank=True, allow_null=True)
2109-
origin = serializers.ChoiceField(choices=Product.ORIGIN_CHOICES, allow_blank=True, allow_null=True)
2106+
business_criticality = serializers.ChoiceField(choices=Product.BUSINESS_CRITICALITY_CHOICES, allow_blank=True, allow_null=True, required=False)
2107+
platform = serializers.ChoiceField(choices=Product.PLATFORM_CHOICES, allow_blank=True, allow_null=True, required=False)
2108+
lifecycle = serializers.ChoiceField(choices=Product.LIFECYCLE_CHOICES, allow_blank=True, allow_null=True, required=False)
2109+
origin = serializers.ChoiceField(choices=Product.ORIGIN_CHOICES, allow_blank=True, allow_null=True, required=False)
21102110

21112111
tags = TagListSerializerField(required=False)
21122112
product_meta = ProductMetaSerializer(read_only=True, many=True)

0 commit comments

Comments
 (0)