From 3f3ca6fe820a35283e8e770c7fbd61b29ab3d233 Mon Sep 17 00:00:00 2001 From: Jens L Date: Wed, 30 Aug 2023 20:39:57 +0200 Subject: [PATCH] core: make groups' parent_name nullable as it might not be set (#6700) Signed-off-by: Jens Langhammer --- authentik/core/api/groups.py | 2 +- schema.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/core/api/groups.py b/authentik/core/api/groups.py index 94d932e1f..961633037 100644 --- a/authentik/core/api/groups.py +++ b/authentik/core/api/groups.py @@ -49,7 +49,7 @@ class GroupSerializer(ModelSerializer): users_obj = ListSerializer( child=GroupMemberSerializer(), read_only=True, source="users", required=False ) - parent_name = CharField(source="parent.name", read_only=True) + parent_name = CharField(source="parent.name", read_only=True, allow_null=True) num_pk = IntegerField(read_only=True) diff --git a/schema.yml b/schema.yml index bc53d9eb9..ed7f520bd 100644 --- a/schema.yml +++ b/schema.yml @@ -30498,6 +30498,7 @@ components: parent_name: type: string readOnly: true + nullable: true users: type: array items: