From 5d8369612eea54a117db32580c0bd0cb69c5e716 Mon Sep 17 00:00:00 2001 From: Jason Schroth Date: Wed, 1 Nov 2023 15:40:44 -0700 Subject: [PATCH] handle possible null actions in interactive.py (#3914) * handle possible null actions interactive.py It is possible that there are tasks, but there is no previous actions value so actions is None. This addresses that issue by setting actions to an empty string if it is None. --- src/dispatch/plugins/dispatch_slack/incident/interactive.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dispatch/plugins/dispatch_slack/incident/interactive.py b/src/dispatch/plugins/dispatch_slack/incident/interactive.py index 509bd083eb3a..27250703b5f2 100644 --- a/src/dispatch/plugins/dispatch_slack/incident/interactive.py +++ b/src/dispatch/plugins/dispatch_slack/incident/interactive.py @@ -1531,6 +1531,7 @@ def handle_report_tactical_command( incident = incident_service.get(db_session=db_session, incident_id=context["subject"].id) if incident.tasks: + actions = "" if actions is None else actions actions += "\n\nOutstanding Incident Tasks:\n".join( [ "-" + task.description