From 2b5c9ebd7c2ab01fe3fff14360c284e3c50b05bf Mon Sep 17 00:00:00 2001 From: Andrew Marwood Date: Fri, 17 Mar 2023 18:36:44 +1100 Subject: [PATCH] [SDAAP-64] Fix null location crash in notifications (#1773) --- server/planning/assignments/assignments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/planning/assignments/assignments.py b/server/planning/assignments/assignments.py index 95012c881..dcc902f20 100644 --- a/server/planning/assignments/assignments.py +++ b/server/planning/assignments/assignments.py @@ -407,7 +407,7 @@ def send_assignment_notification(self, updates, original=None, force=False): event["PRIORITY"] = priority if event_item: - if len(event_item.get("location", [])) > 0: + if event_item.get("location"): location = event_item["location"][0] format_address(location) formatted_location = (