Skip to content

Commit

Permalink
Concept/Mapping | version | update comment is not mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Feb 19, 2021
1 parent de66255 commit a37de62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/concepts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ConceptListSerializer(ModelSerializer):
id = CharField(source='mnemonic')
source = CharField(source='parent_resource')
owner = CharField(source='owner_name')
update_comment = CharField(source='comment', required=False)
update_comment = CharField(source='comment', required=False, allow_null=True, allow_blank=True)
locale = SerializerMethodField()
url = CharField(required=False, source='versioned_object_url')
version_created_on = DateTimeField(source='created_at', read_only=True)
Expand Down Expand Up @@ -171,7 +171,7 @@ class ConceptDetailSerializer(ModelSerializer):
owner_type = CharField(read_only=True)
owner_url = URLField(read_only=True)
extras = JSONField(required=False, allow_null=True)
update_comment = CharField(required=False, source='comment')
update_comment = CharField(required=False, source='comment', allow_null=True, allow_blank=True)
mappings = SerializerMethodField()
url = CharField(required=False, source='versioned_object_url')
updated_by = DateTimeField(source='updated_by.username', read_only=True)
Expand Down Expand Up @@ -234,7 +234,7 @@ class ConceptVersionDetailSerializer(ModelSerializer):
mappings = SerializerMethodField()
url = CharField(source='versioned_object_url', read_only=True)
previous_version_url = CharField(source='prev_version_uri', read_only=True)
update_comment = CharField(source='comment', required=False)
update_comment = CharField(source='comment', required=False, allow_null=True, allow_blank=True)

def __init__(self, *args, **kwargs):
params = get(kwargs, 'context.request.query_params')
Expand Down
2 changes: 1 addition & 1 deletion core/mappings/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MappingListSerializer(ModelSerializer):
uuid = CharField(source='id', read_only=True)
source = CharField(source='parent_resource', read_only=True)
owner = CharField(source='owner_name', read_only=True)
update_comment = CharField(source='comment', required=False)
update_comment = CharField(source='comment', required=False, allow_null=True, allow_blank=True)
url = CharField(required=False, source='versioned_object_url')
version = CharField(read_only=True)
version_created_on = DateTimeField(source='created_at', read_only=True)
Expand Down

0 comments on commit a37de62

Please sign in to comment.