diff --git a/aleksis/apps/kolego/schema/absence.py b/aleksis/apps/kolego/schema/absence.py index 92e7f40ade43fc58bef006510724fb3d68f83756..dbfa2339070db03a354a66065179c0f0f6028562 100644 --- a/aleksis/apps/kolego/schema/absence.py +++ b/aleksis/apps/kolego/schema/absence.py @@ -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):