Skip to content

Commit 7671684

Browse files
path validation fixed
1 parent baf71fa commit 7671684

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

src/eligibility_signposting_api/common/request_validator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def validate_query_params(query_params: dict[str, str]) -> tuple[bool, ResponseR
4040

4141

4242
def validate_nhs_number_in_header(path_nhs: str | None, header_nhs: str | None) -> bool:
43-
if not path_nhs:
44-
logger.error("NHS number is not present in path", extra={"header_nhs": header_nhs, "path_nhs": path_nhs})
45-
return False
46-
4743
if header_nhs != path_nhs:
4844
logger.error("NHS number mismatch", extra={"header_nhs": header_nhs, "path_nhs": path_nhs})
4945
return False

tests/unit/common/test_request_validator.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class TestValidateNHSNumber:
2020
@pytest.mark.parametrize(
2121
("path_nhs", "header_nhs", "expected_result", "expected_log_msg"),
2222
[
23-
(None, None, False, "NHS number is not present in path"),
24-
(None, "1234567890", False, "NHS number is not present in path"),
2523
("1234567890", None, False, "NHS number mismatch"),
2624
("1234567890", "", False, "NHS number mismatch"),
2725
("1234567890", "0987654321", False, "NHS number mismatch"),

0 commit comments

Comments
 (0)