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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Mike Gabriel
AlekSIS-App-Untis
Commits
51f317cb
Verified
Commit
51f317cb
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Drop usage of no-longer used match var in lessons importer
parent
9754df99
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+5
-0
5 additions, 0 deletions
CHANGELOG.rst
aleksis/apps/untis/util/mysql/importers/lessons.py
+2
-5
2 additions, 5 deletions
aleksis/apps/untis/util/mysql/importers/lessons.py
with
7 additions
and
5 deletions
CHANGELOG.rst
+
5
−
0
View file @
51f317cb
...
...
@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Fixed
~~~~~
* Matching for groups while importing lessons was broken in some cases.
`2.2`_ - 2022-04-10
-------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/untis/util/mysql/importers/lessons.py
+
2
−
5
View file @
51f317cb
...
...
@@ -139,7 +139,6 @@ def import_lessons(
if
compare_m2m
(
course_classes
,
found_group
.
parent_groups
.
all
())
and
compare_m2m
(
teachers
,
found_group
.
owners
.
all
()
):
match
=
True
course_group
=
found_group
logger
.
info
(
"
Course group found by searching by parent groups,
"
...
...
@@ -147,7 +146,7 @@ def import_lessons(
)
if
(
not
match
not
course_group
and
get_site_preferences
()[
"
untis_mysql__course_groups_fuzzy_matching
"
]
):
if
qs
.
count
()
!=
1
:
...
...
@@ -158,16 +157,14 @@ def import_lessons(
else
:
for
found_group
in
qs
:
if
compare_m2m
(
teachers
,
found_group
.
owners
.
all
()):
if
match
:
if
course_group
:
logger
.
warning
(
"
More than one course group found
"
"
by searching by parent groups,
"
"
teachers (owners) and subject (fuzzy matching mode)
"
)
match
=
False
course_group
=
None
else
:
match
=
True
course_group
=
found_group
logger
.
info
(
"
Course group found by searching by parent groups,
"
...
...
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