Skip to content

Commit 3703ea8

Browse files
committed
tidy
1 parent dd9f63e commit 3703ea8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/src/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ class Urls:
2424

2525
GENERIC_SERVER_ERROR_DIAGNOSTICS_MESSAGE = "Unable to process request. Issue may be transient."
2626

27-
VACCINE_TYPE_TO_DISEASES_HASH_KEY = "vacc_to_diseases"
27+
VACCINE_TYPE_TO_DISEASES_HASH_KEY = "vacc_to_diseases"
28+
DISEASES_TO_VACCINE_TYPE_HASH_KEY = "diseases_to_vacc"

backend/src/models/utils/validation_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
from models.obtain_field_value import ObtainFieldValue
1010
from models.field_names import FieldNames
1111
from models.errors import MandatoryError
12-
from constants import Urls
12+
from constants import Urls, DISEASES_TO_VACCINE_TYPE_HASH_KEY
1313
from clients import redis_client
14-
from unittest.mock import Mock
1514

1615

1716
def get_target_disease_codes(immunization: dict):
@@ -54,7 +53,7 @@ def convert_disease_codes_to_vaccine_type(disease_codes_input: list) -> Union[st
5453
otherwise raises a value error
5554
"""
5655
key = ":".join(sorted(disease_codes_input))
57-
vaccine_type = redis_client.hget("diseases_to_vacc", key)
56+
vaccine_type = redis_client.hget(DISEASES_TO_VACCINE_TYPE_HASH_KEY, key)
5857

5958
if not vaccine_type:
6059
raise ValueError(

0 commit comments

Comments
 (0)