Merge pull request 'master' (#174) from master into Docker

Reviewed-on: SGD-Nord/konova#174
This commit is contained in:
2022-06-02 09:38:06 +02:00
6 changed files with 170 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
from django.db import migrations, transaction
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_biotopes_from_974_to_654(apps, schema_editor):
@@ -23,7 +23,7 @@ def migrate_biotopes_from_974_to_654(apps, schema_editor):
all_states = CompensationState.objects.all()
after_state_list_elements = all_states.filter(
biotope_type__code_lists__in=[CODELIST_AFTER_STATE_BIOTOPES__ID]
biotope_type__code_lists__in=[CODELIST_AFTER_STATE_BIOTOPES_ID]
)
if after_state_list_elements.count() > 0:
raise Exception("Still states with wrong codelist entries!")