Skip to content
Snippets Groups Projects
Commit af81bbb0 authored by Julian's avatar Julian
Browse files

Create field for child_groups

parent d190acb3
No related branches found
No related tags found
1 merge request!1261Manage holidays
Pipeline #136864 canceled
......@@ -19,6 +19,7 @@ Added
~~~~~
* Introduce Holiday model to track information about holidays.
* Created field for child groups in the GraphQL type for groups.
`3.1.1` - 2023-07-01
--------------------
......
......@@ -17,6 +17,7 @@ class GroupType(DjangoObjectType):
"short_name",
"members",
"owners",
"child_groups",
"parent_groups",
"group_type",
"additional_fields",
......@@ -28,6 +29,10 @@ class GroupType(DjangoObjectType):
def resolve_parent_groups(root, info, **kwargs):
return get_objects_for_user(info.context.user, "core.view_group", root.parent_groups.all())
@staticmethod
def resolve_child_groups(root, info, **kwargs):
return get_objects_for_user(info.context.user, "core.view_group", root.child_groups.all())
@staticmethod
def resolve_members(root, info, **kwargs):
persons = get_objects_for_user(info.context.user, "core.view_person", root.members.all())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment