mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-10 06:04:15 +00:00
Mark optional fields in bookmark serializer (#78)
This commit is contained in:
parent
afe081d3b5
commit
b7a8f9e53d
1 changed files with 4 additions and 1 deletions
|
@ -30,8 +30,11 @@ class BookmarkSerializer(serializers.ModelSerializer):
|
|||
'date_modified'
|
||||
]
|
||||
|
||||
# Override optional char fields to provide default value
|
||||
title = serializers.CharField(required=False, allow_blank=True, default='')
|
||||
description = serializers.CharField(required=False, allow_blank=True, default='')
|
||||
# Override readonly tag_names property to allow passing a list of tag names to create/update
|
||||
tag_names = TagListField()
|
||||
tag_names = TagListField(required=False, default=[])
|
||||
|
||||
def create(self, validated_data):
|
||||
bookmark = Bookmark()
|
||||
|
|
Loading…
Reference in a new issue