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

Always return substitutions for the selected date (and not the next relevant) in GraphQL

parent d764b4fd
No related branches found
No related tags found
1 merge request!388Resolve "Don't show monday on sundays"
Pipeline #193819 passed
......@@ -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,
......
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