From 07489c77916b89ef06033ffcbc4c5b3b2f87168d Mon Sep 17 00:00:00 2001 From: AndyFlintNHS Date: Thu, 21 Nov 2024 15:53:25 +0000 Subject: [PATCH] [PRMP-1242] refactored boolean logic for PDS API stubbing --- lambdas/utils/utilities.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lambdas/utils/utilities.py b/lambdas/utils/utilities.py index df2504f33..c093340ae 100755 --- a/lambdas/utils/utilities.py +++ b/lambdas/utils/utilities.py @@ -46,13 +46,13 @@ def create_reference_id() -> str: def get_pds_service() -> PatientSearch: - if os.getenv("PDS_FHIR_IS_STUBBED") not in ["False", "false"]: + if os.getenv("PDS_FHIR_IS_STUBBED") in ["False", "false"]: + ssm_service = SSMService() + auth_service = NhsOauthService(ssm_service) + return PdsApiService(ssm_service, auth_service) + else: return MockPdsApiService() - ssm_service = SSMService() - auth_service = NhsOauthService(ssm_service) - return PdsApiService(ssm_service, auth_service) - def redact_id_to_last_4_chars(str_id: str) -> str: return str_id[-4:]