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

Fix guess_school_id migration

parent c6d9d401
No related branches found
No related tags found
No related merge requests found
......@@ -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
---------------------
......
......@@ -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):
......
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