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
Merge requests
!141
Resolve "Check if getters for lesson periods work correctly"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Check if getters for lesson periods work correctly"
118-check-if-getters-for-lesson-periods-work-correctly
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Jonathan Weth
requested to merge
118-check-if-getters-for-lesson-periods-work-correctly
into
master
4 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#118 (closed)
Edited
4 years ago
by
Jonathan Weth
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
0ac850c2
1 commit,
4 years ago
1 file
+
6
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
aleksis/apps/chronos/models.py
+
6
−
4
Options
@@ -453,14 +453,16 @@ class LessonPeriod(WeekAnnotationMixin, TeacherPropertiesMixin, ExtensibleModel)
return
None
def
get_subject
(
self
)
->
Optional
[
Subject
]:
if
self
.
get_substitution
()
and
self
.
get_substitution
().
subject
:
return
self
.
get_substitution
().
subject
sub
=
self
.
get_substitution
()
if
sub
and
sub
.
subject
:
return
sub
.
subject
else
:
return
self
.
lesson
.
subject
def
get_teachers
(
self
)
->
models
.
query
.
QuerySet
:
if
self
.
get_substitution
():
return
self
.
get_substitution
().
teachers
sub
=
self
.
get_substitution
()
if
sub
and
sub
.
teachers
.
all
():
return
sub
.
teachers
else
:
return
self
.
lesson
.
teachers
Loading