Skip to content
Snippets Groups Projects
Commit ec519308 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch...

Merge branch '53-guess_school_id-migration-does-not-work-properly-coming-from-untis-2-1-3' into 'master'

Resolve "guess_school_id migration does not work properly coming from Untis 2.1.3"

Closes #53

See merge request AlekSIS/official/AlekSIS-App-Untis!155
parents c6d9d401 cc0c4213
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,12 @@ and this project adheres to `Semantic Versioning`_. ...@@ -9,6 +9,12 @@ and this project adheres to `Semantic Versioning`_.
Unreleased Unreleased
---------- ----------
Fixed
~~~~~
* Guessing school ID could fail in `aleksis-admin migrate` under some
version conditions
`2.3.1`_ - 2022-08-13 `2.3.1`_ - 2022-08-13
--------------------- ---------------------
......
...@@ -13,9 +13,10 @@ def guess_school_id(apps, schema_editor): ...@@ -13,9 +13,10 @@ def guess_school_id(apps, schema_editor):
except ValidityRange.DoesNotExist: except ValidityRange.DoesNotExist:
return return
school_id = vr.school_id_untis if not vr or not vr.school_id_untis:
if school_id: return
get_site_preferences()["untis_mysql__school_id"] = school_id
get_site_preferences()["untis_mysql__school_id"] = school_id
class Migration(migrations.Migration): class Migration(migrations.Migration):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment