From 2a697d1b5b3b314b9c618d7e8049c246d4870bfd Mon Sep 17 00:00:00 2001 From: Nick Jackson Date: Thu, 19 Dec 2024 13:33:21 +0000 Subject: [PATCH] Simplify if/else statement to ternary operator --- ds-caselaw-ingester/lambda_function.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ds-caselaw-ingester/lambda_function.py b/ds-caselaw-ingester/lambda_function.py index d1733e7..62f86eb 100644 --- a/ds-caselaw-ingester/lambda_function.py +++ b/ds-caselaw-ingester/lambda_function.py @@ -474,10 +474,7 @@ def send_updated_judgment_notification(self) -> None: print(f'Sent update notification to {os.getenv("NOTIFY_EDITORIAL_ADDRESS")} (Message ID: {response["id"]})') def send_new_judgment_notification(self) -> None: - if "/press-summary/" in self.uri: - doctype = "Press Summary" - else: - doctype = "Judgment" + doctype = "Press Summary" if "/press-summary/" in self.uri else "Judgment" personalisation = personalise_email(self.uri, self.metadata) personalisation["doctype"] = doctype