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
9c92bdfc
Commit
9c92bdfc
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Plain Diff
Merge branch '118-check-if-getters-for-lesson-periods-work-correctly' into 'master'
Resolve "Check if getters for lesson periods work correctly" Closes
#118
See merge request
!141
parents
e13bc720
0ac850c2
Branches
130-show-print-timetable-button-on-mobile-devices
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!141
Resolve "Check if getters for lesson periods work correctly"
Pipeline
#6688
canceled
3 years ago
Stage: test
Stage: build
Stage: publish
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/models.py
+6
-4
6 additions, 4 deletions
aleksis/apps/chronos/models.py
with
6 additions
and
4 deletions
aleksis/apps/chronos/models.py
+
6
−
4
View file @
9c92bdfc
...
...
@@ -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
...
...
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