Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Official
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
0inraMfauri
Official
Commits
cc0c4213
Verified
Commit
cc0c4213
authored
2 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Fix guess_school_id migration
parent
c6d9d401
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+6
-0
6 additions, 0 deletions
CHANGELOG.rst
aleksis/apps/untis/migrations/0003_guess_school_id.py
+4
-3
4 additions, 3 deletions
aleksis/apps/untis/migrations/0003_guess_school_id.py
with
10 additions
and
3 deletions
CHANGELOG.rst
+
6
−
0
View file @
cc0c4213
...
...
@@ -9,6 +9,12 @@ and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Fixed
~~~~~
* Guessing school ID could fail in `aleksis-admin migrate` under some
version conditions
`2.3.1`_ - 2022-08-13
---------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/untis/migrations/0003_guess_school_id.py
+
4
−
3
View file @
cc0c4213
...
...
@@ -13,9 +13,10 @@ def guess_school_id(apps, schema_editor):
except
ValidityRange
.
DoesNotExist
:
return
school_id
=
vr
.
school_id_untis
if
school_id
:
get_site_preferences
()[
"
untis_mysql__school_id
"
]
=
school_id
if
not
vr
or
not
vr
.
school_id_untis
:
return
get_site_preferences
()[
"
untis_mysql__school_id
"
]
=
school_id
class
Migration
(
migrations
.
Migration
):
...
...
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