From fe9c5dfe94701c6d85a418dc11f7e8b920f5126e Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Sun, 17 Nov 2024 21:25:29 +0100
Subject: [PATCH] Always return substitutions for the selected date (and not
 the next relevant) in GraphQL

---
 aleksis/apps/chronos/schema/__init__.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/aleksis/apps/chronos/schema/__init__.py b/aleksis/apps/chronos/schema/__init__.py
index ab1d0025..542aff57 100644
--- a/aleksis/apps/chronos/schema/__init__.py
+++ b/aleksis/apps/chronos/schema/__init__.py
@@ -14,7 +14,7 @@ from aleksis.core.util.core_helpers import get_site_preferences, has_person
 
 from ..models import LessonEvent
 from ..util.build import build_substitutions_list
-from ..util.chronos_helpers import get_groups, get_next_relevant_day, get_rooms, get_teachers
+from ..util.chronos_helpers import get_groups, get_rooms, get_teachers
 
 
 class TimetablePersonType(DjangoObjectType):
@@ -278,9 +278,7 @@ class Query(graphene.ObjectType):
         return all_timetables
 
     def resolve_substitutions_for_date(root, info, date):
-        substitutions, affected_teachers, affected_groups = build_substitutions_list(
-            get_next_relevant_day(date)
-        )
+        substitutions, affected_teachers, affected_groups = build_substitutions_list(date)
         return SubstitutionsForDateType(
             affected_teachers=affected_teachers,
             affected_groups=affected_groups,
-- 
GitLab