* adds geometry-remerging with former deductions
* adds geometry-area calculation
* adds fallback for old data migration on deprecated biotope code lists
* fixes typo in CODELIST_AFTER_STATE_BIOTOPES_ID
This commit is contained in:
2022-03-22 16:36:52 +01:00
parent f312dafa68
commit f621aab6e1
5 changed files with 86 additions and 22 deletions

View File

@@ -3,7 +3,7 @@
from django.db import migrations, models, transaction
import django.db.models.deletion
from codelist.settings import CODELIST_BIOTOPES_ID, CODELIST_AFTER_STATE_BIOTOPES__ID
from codelist.settings import CODELIST_BIOTOPES_ID, CODELIST_AFTER_STATE_BIOTOPES_ID
def migrate_entries_974_to_654(apps, schema_editor):
@@ -23,7 +23,7 @@ def migrate_entries_974_to_654(apps, schema_editor):
state.save()
old_list_states = CompensationState.objects.filter(
biotope_type__code_lists__in=[CODELIST_AFTER_STATE_BIOTOPES__ID]
biotope_type__code_lists__in=[CODELIST_AFTER_STATE_BIOTOPES_ID]
)
if old_list_states.count() > 0:
raise Exception("Still unmigrated values!")