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
Commits
54aa0bf6
Verified
Commit
54aa0bf6
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 41-create-match-failures-as-data-checks
parents
23cb5092
7519ac31
No related branches found
No related tags found
1 merge request
!120
Resolve "Create match failures as data checks"
Pipeline
#53517
passed
3 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.rst
+5
-0
5 additions, 0 deletions
CHANGELOG.rst
aleksis/apps/untis/preferences.py
+7
-0
7 additions, 0 deletions
aleksis/apps/untis/preferences.py
aleksis/apps/untis/util/mysql/importers/substitutions.py
+12
-0
12 additions, 0 deletions
aleksis/apps/untis/util/mysql/importers/substitutions.py
with
24 additions
and
0 deletions
CHANGELOG.rst
+
5
−
0
View file @
54aa0bf6
...
...
@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Changed
~~~~~~~
* Do not import incomplete substitutions.
`2.1.1`_ - 2022-01-29
---------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/untis/preferences.py
+
7
−
0
View file @
54aa0bf6
...
...
@@ -108,3 +108,10 @@ class CreateObjectsForWhichUntisIsNotPrimarySource(BooleanPreference):
name
=
"
create_objects_untis_not_primary_source
"
default
=
True
verbose_name
=
_
(
"
Create objects for which Untis is not primary source
"
)
class
IgnoreIncompleteSubstitutions
(
BooleanPreference
):
section
=
untis_mysql
name
=
"
ignore_incomplete_substitutions
"
default
=
True
verbose_name
=
_
(
"
Ignore incomplete substitutions
"
)
This diff is collapsed.
Click to expand it.
aleksis/apps/untis/util/mysql/importers/substitutions.py
+
12
−
0
View file @
54aa0bf6
...
...
@@ -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
...
...
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