Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Untis
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-Untis
Merge requests
!119
Resolve "Option to hide incomplete substitutions from the plan"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Option to hide incomplete substitutions from the plan"
39-option-to-hide-incomplete-substitutions-from-the-plan
into
master
Overview
0
Commits
1
Pipelines
4
Changes
3
Merged
Jonathan Weth
requested to merge
39-option-to-hide-incomplete-substitutions-from-the-plan
into
master
3 years ago
Overview
0
Commits
1
Pipelines
4
Changes
3
Expand
Closes
#39 (closed)
Edited
3 years ago
by
Jonathan Weth
0
0
Merge request reports
Compare
master
version 2
8c5beb49
3 years ago
version 1
3b4fdfd2
3 years ago
master (base)
and
latest version
latest version
377c12ff
1 commit,
3 years ago
version 2
8c5beb49
1 commit,
3 years ago
version 1
3b4fdfd2
1 commit,
3 years ago
3 files
+
25
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
aleksis/apps/untis/util/mysql/importers/substitutions.py
+
12
−
0
Options
@@ -8,6 +8,7 @@ from tqdm import tqdm
from
aleksis.apps.chronos
import
models
as
chronos_models
from
aleksis.apps.chronos.models
import
ValidityRange
from
aleksis.core.util.core_helpers
import
get_site_preferences
from
....
import
models
as
mysql_models
from
..util
import
(
@@ -138,6 +139,17 @@ def import_substitutions(
for
id_
in
class_ids
:
classes
.
append
(
classes_ref
[
id_
])
if
get_site_preferences
()[
"
untis_mysql__ignore_incomplete_substitutions
"
]:
# Skip incomplete substitutions
if
(
not
room_new
and
not
subject_new
and
not
teachers
and
not
cancelled
and
not
cancelled_for_teachers
):
continue
if
lesson_period
:
(
substitution
,
created
,)
=
chronos_models
.
LessonSubstitution
.
objects
.
get_or_create
(
lesson_period
=
lesson_period
,
week
=
week
.
week
,
year
=
week
.
year
Loading