Skip to content

Commit 39c0091

Browse files
committed
sonar
1 parent d0d383c commit 39c0091

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lambdas/backend/src/models/utils/validation_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ def convert_disease_codes_to_vaccine_type(
5353
vaccine_type = redis_client.hget(Constants.DISEASES_TO_VACCINE_TYPE_HASH_KEY, key)
5454

5555
if not vaccine_type:
56-
raise ValueError( # NOSONAR(S5332)
57-
"Validation errors: protocolApplied[0].targetDisease[*].coding[?(@.system=='"
58-
"http://snomed.info/sct"
56+
raise ValueError(
57+
f"Validation errors: protocolApplied[0].targetDisease[*].coding[?(@.system=='{Urls.snomed}"
5958
f"')].code - {disease_codes_input} is not a valid combination of disease codes for this service"
6059
)
6160
return vaccine_type

lambdas/recordforwarder/src/models/utils/validation_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ def convert_disease_codes_to_vaccine_type(
5757
vaccine_type = redis_client.hget(Constants.DISEASES_TO_VACCINE_TYPE_HASH_KEY, key)
5858

5959
if not vaccine_type:
60-
raise ValueError( # NOSONAR(S5332)
61-
"Validation errors: protocolApplied[0].targetDisease[*].coding[?(@.system=='"
62-
"http://snomed.info/sct"
60+
raise ValueError(
61+
f"Validation errors: protocolApplied[0].targetDisease[*].coding[?(@.system=='{Urls.snomed}"
6362
f"')].code - {disease_codes_input} is not a valid combination of disease codes for this service"
6463
)
6564
return vaccine_type

0 commit comments

Comments
 (0)