Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Chronos
Commits
e02ba29e
Verified
Commit
e02ba29e
authored
5 months ago
by
permcu
Committed by
Jonathan Weth
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix substitutions-query-backen
parent
06196560
No related branches found
No related tags found
1 merge request
!373
Resolve "Substitutions table for new data model"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/schema/__init__.py
+4
-4
4 additions, 4 deletions
aleksis/apps/chronos/schema/__init__.py
with
4 additions
and
4 deletions
aleksis/apps/chronos/schema/__init__.py
+
4
−
4
View file @
e02ba29e
...
...
@@ -194,10 +194,10 @@ class SubstitutionType(graphene.ObjectType):
return
None
elif
not
le
.
amends
.
subject
and
not
le
.
subject
:
return
le
.
title
elif
le
.
subject
and
le
.
s
amends
.
subject
:
elif
le
.
subject
and
le
.
amends
.
subject
:
return
le
.
subject
else
:
return
[]
return
None
def
resolve_old_rooms
(
root
,
object
):
le
=
root
[
'
REFERENCE_OBJECT
'
]
...
...
@@ -227,7 +227,7 @@ class Query(graphene.ObjectType):
timetable_groups
=
graphene
.
List
(
TimetableGroupType
)
timetable_rooms
=
graphene
.
List
(
TimetableRoomType
)
available_timetables
=
graphene
.
List
(
TimetableObjectType
)
substitutions_for_date
=
graphene
.
List
(
substitutions_for_date
=
graphene
.
Field
(
SubstitutionsForDateType
,
date
=
graphene
.
Date
(),
)
...
...
@@ -274,7 +274,7 @@ class Query(graphene.ObjectType):
def
resolve_substitutions_for_date
(
root
,
info
,
date
):
substitutions
,
affected_teachers
,
affected_groups
=
build_substitutions_list
(
get_next_relevant_day
(
date
))
SubstitutionsForDateType
(
return
SubstitutionsForDateType
(
affected_teachers
=
affected_teachers
,
affected_groups
=
affected_groups
,
substitutions
=
[
sub
[
'
el
'
]
for
sub
in
substitutions
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment