Skip to content
Snippets Groups Projects
Commit 23460e74 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Merge branch 'manage-holidays' of edugit.org:AlekSIS/official/AlekSIS-Core into manage-holidays

parents fa4df9e5 af81bbb0
No related branches found
No related tags found
1 merge request!1261Manage holidays
Pipeline #136865 failed
......@@ -58,6 +58,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