File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ class Urls:
2323
2424
2525GENERIC_SERVER_ERROR_DIAGNOSTICS_MESSAGE = "Unable to process request. Issue may be transient."
26+
27+ VACCINE_TYPE_TO_DISEASES_HASH_KEY = "vacc_to_diseases"
Original file line number Diff line number Diff line change 88
99from clients import redis_client
1010from models .errors import ParameterException
11+ from constants import VACCINE_TYPE_TO_DISEASES_HASH_KEY
1112
1213ParamValue = list [str ]
1314ParamContainer = dict [str , ParamValue ]
@@ -108,7 +109,7 @@ def process_search_params(params: ParamContainer) -> SearchParams:
108109 if len (vaccine_types ) < 1 :
109110 raise ParameterException (f"Search parameter { immunization_target_key } must have one or more values." )
110111
111- valid_vaccine_types = redis_client .hkeys ("vacc_to_diseases" )
112+ valid_vaccine_types = redis_client .hkeys (VACCINE_TYPE_TO_DISEASES_HASH_KEY )
112113 if any ([x not in valid_vaccine_types for x in vaccine_types ]):
113114 raise ParameterException (
114115 f"immunization-target must be one or more of the following: { ', ' .join (valid_vaccine_types )} " )
You can’t perform that action at this time.
0 commit comments