Skip to content

Commit

Permalink
Merge pull request #3525 from SFDO-Tooling/update-serializers
Browse files Browse the repository at this point in the history
Update serializers
  • Loading branch information
davidmreed authored Aug 9, 2023
2 parents df88f78 + 4cde064 commit 0be3263
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions metadeploy/adminapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__"
Expand Down
5 changes: 2 additions & 3 deletions metadeploy/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0be3263

Please sign in to comment.