From d38ad5040388b49ca2112156baa770fa59bb230f Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Fri, 11 Nov 2022 11:24:49 +0100 Subject: [PATCH] CompensationState invalid code fix * fixes bug which occurs for non existing code --- .../management/commands/kspMigrater/compensation_migrater.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/konova/management/commands/kspMigrater/compensation_migrater.py b/konova/management/commands/kspMigrater/compensation_migrater.py index eecff9c0..3a40947d 100644 --- a/konova/management/commands/kspMigrater/compensation_migrater.py +++ b/konova/management/commands/kspMigrater/compensation_migrater.py @@ -178,7 +178,8 @@ class CompensationMigrater(BaseMigrater): code_lists__in=[CODELIST_AFTER_STATE_BIOTOPES_ID] ) except ObjectDoesNotExist: - raise ObjectDoesNotExist(f"{compensation.identifier} has unknown state code: {state_type}") + # total garbage - can not be processed. Jump to next entry + continue tmp_cursor_z_code = self.db_connection.cursor() tmp_cursor_z_code.execute(z_code_sql.format(pkey_entry)) z_code_results = tmp_cursor_z_code.fetchall()