Skip to content
Snippets Groups Projects
Commit c7e7b2a8 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '29-use-select_related-in-absence-list' into 'master'

Resolve "Use select_related in absence list"

Closes #29

See merge request !47
parents 4231b4ac b34ebc7b
No related branches found
No related tags found
1 merge request!47Resolve "Use select_related in absence list"
Pipeline #193693 passed
......@@ -67,7 +67,9 @@ class AbsenceType(PermissionsTypeMixin, DjangoFilterMixin, DjangoObjectType):
@classmethod
def get_queryset(cls, queryset, info):
return get_objects_for_user(info.context.user, "kolego.view_absence", queryset)
query = get_objects_for_user(info.context.user, "kolego.view_absence", queryset)
query = query.select_related("person", "reason")
return query
class AbsenceBatchCreateMutation(BaseBatchCreateMutation):
......
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