Skip to content

Commit 2760489

Browse files
clean up the dormant PII logs (#312)
* clean up the dormant PII logs * lint fix
1 parent 8df72f4 commit 2760489

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

src/eligibility_signposting_api/repos/person_repo.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ def __init__(self, table: Annotated[Any, Inject(qualifier="person_table")]) -> N
3838

3939
def get_eligibility_data(self, nhs_number: NHSNumber) -> Person:
4040
response = self.table.query(KeyConditionExpression=Key("NHS_NUMBER").eq(nhs_number))
41-
logger.debug("response %r for %r", response, nhs_number, extra={"response": response, "nhs_number": nhs_number})
4241

4342
if not (items := response.get("Items")) or not next(
4443
(item for item in items if item.get("ATTRIBUTE_TYPE") == "PERSON"), None
4544
):
4645
message = f"Person not found with nhs_number {nhs_number}"
4746
raise NotFoundError(message)
4847

49-
logger.debug("returning items %s", items, extra={"items": items})
50-
5148
return Person(data=items)

src/eligibility_signposting_api/services/eligibility_services.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ def get_eligibility_status(
4242
try:
4343
person_data = self.person_repo.get_eligibility_data(nhs_number)
4444
campaign_configs = list(self.campaign_repo.get_campaign_configs())
45-
logger.debug(
46-
"got person_data for %r",
47-
nhs_number,
48-
extra={
49-
"campaign_configs": [c.model_dump(by_alias=True) for c in campaign_configs],
50-
"person_data": person_data,
51-
"nhs_number": nhs_number,
52-
},
53-
)
5445
except NotFoundError as e:
5546
raise UnknownPersonError from e
5647
else:

tests/integration/lambda/test_app_running_as_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_install_and_call_lambda_flask(
8181
has_entries(statusCode=HTTPStatus.OK, body=is_json_that(has_key("processedSuggestions"))),
8282
)
8383

84-
assert_that(log_output, contains_string("person_data"))
84+
assert_that(log_output, contains_string("checking nhs_number"))
8585

8686

8787
def test_install_and_call_flask_lambda_over_http(

0 commit comments

Comments
 (0)