*: fix JSONField overwriting required

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-11 23:20:45 +02:00
parent f9bf491240
commit fae92f6bc8
4 changed files with 3 additions and 4 deletions

View file

@ -10,7 +10,7 @@ from authentik.core.models import Group
class GroupSerializer(ModelSerializer):
"""Group Serializer"""
attributes = JSONField(validators=[is_dict])
attributes = JSONField(validators=[is_dict], required=False)
class Meta:

View file

@ -26,7 +26,7 @@ class UserSerializer(ModelSerializer):
is_superuser = BooleanField(read_only=True)
avatar = CharField(read_only=True)
attributes = JSONField(validators=[is_dict])
attributes = JSONField(validators=[is_dict], required=False)
class Meta:

View file

@ -29,7 +29,7 @@ class InvitationStageViewSet(ModelViewSet):
class InvitationSerializer(ModelSerializer):
"""Invitation Serializer"""
fixed_data = JSONField(validators=[is_dict])
fixed_data = JSONField(validators=[is_dict], required=False)
class Meta:

View file

@ -17725,7 +17725,6 @@ definitions:
x-nullable: true
fixed_data:
title: Fixed data
description: Optional fixed data to enforce on user enrollment.
type: object
created_by:
required: