From 3d57364f19c388947f6d01a78fc6beb1ea9ae011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Bagi=C5=84ski?= Date: Thu, 17 Aug 2023 14:38:43 +0200 Subject: [PATCH] removed error on non-matching question status --- api/coda.py | 11 ++++------- api/utilities/coda_utils.py | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/api/coda.py b/api/coda.py index 84ad229..c03f83f 100644 --- a/api/coda.py +++ b/api/coda.py @@ -522,18 +522,15 @@ def get_all_statuses(self) -> list[str]: r["Status"].value for r in status_table.rows() if r["Status"].value } # load status values defined in code - code_status_vals = set(get_args(QuestionStatus)) + encoded_status_vals = set(get_args(QuestionStatus)) # if mismatch, log and raise errory - if coda_status_vals != code_status_vals: - msg = "Status values defined in api/utilities/coda_utils.py don't match the values in coda" - self.log.error( + if coda_status_vals != encoded_status_vals: + self.log.warning( self.class_name, msg="Status values defined in api/utilities/coda_utils.py don't match the values in coda", - code_status_vals=code_status_vals, + code_status_vals=encoded_status_vals, coda_status_vals=coda_status_vals, ) - msg += f"; {code_status_vals=}; {coda_status_vals=}" - raise AssertionError(msg) return sorted(coda_status_vals) @staticmethod diff --git a/api/utilities/coda_utils.py b/api/utilities/coda_utils.py index 8b4da91..0c2cf5a 100644 --- a/api/utilities/coda_utils.py +++ b/api/utilities/coda_utils.py @@ -64,6 +64,7 @@ class QuestionRow(TypedDict): QuestionStatus = Literal[ "Bulletpoint sketch", "Duplicate", + "Dormant", "In progress", "In review", "Live on site",