diff --git a/metadeploy/adminapi/api.py b/metadeploy/adminapi/api.py index c10c3336f8..35981319ca 100644 --- a/metadeploy/adminapi/api.py +++ b/metadeploy/adminapi/api.py @@ -15,11 +15,11 @@ class ProductSerializer(AdminAPISerializer): title = serializers.CharField() - short_description = serializers.CharField() - description = serializers.CharField() - click_through_agreement = serializers.CharField() - error_message = serializers.CharField() - slug = serializers.CharField() + short_description = serializers.CharField(default="") + description = serializers.CharField(default="") + click_through_agreement = serializers.CharField(default="") + error_message = serializers.CharField(default="") + slug = serializers.CharField(read_only=True) class Meta: fields = "__all__" diff --git a/metadeploy/api/serializers.py b/metadeploy/api/serializers.py index 7a835f94c2..4ac319fbd1 100644 --- a/metadeploy/api/serializers.py +++ b/metadeploy/api/serializers.py @@ -328,13 +328,12 @@ class ProductSerializer(CircumspectSerializerMixin, serializers.ModelSerializer) is_allowed = serializers.SerializerMethodField() description = serializers.CharField(source="description_markdown") click_through_agreement = serializers.CharField( - source="click_through_agreement_markdown", allow_blank=True + source="click_through_agreement_markdown" ) title = serializers.CharField() - short_description = serializers.CharField(allow_blank=True) + short_description = serializers.CharField() not_allowed_instructions = serializers.SerializerMethodField() is_listed = serializers.SerializerMethodField() - image = serializers.FileField(allow_null=True) class Meta: model = Product