Skip to content

Commit

Permalink
Simplify if/else statement to ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonj04 committed Dec 19, 2024
1 parent 012b3a6 commit 2a697d1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ds-caselaw-ingester/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a697d1

Please sign in to comment.