core: add default for user's settings attribute

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-09 15:57:31 +02:00
parent 994c1c4b6a
commit 8965451073

View file

@ -103,7 +103,7 @@ class UserSelfSerializer(ModelSerializer):
avatar = CharField(read_only=True)
groups = SerializerMethodField()
uid = CharField(read_only=True)
settings = DictField(source="attributes.settings")
settings = DictField(source="attributes.settings", default=dict)
@extend_schema_field(
ListSerializer(