From 619dd769fd074fe2d5b2d9be5fadbcad1ef28f8f Mon Sep 17 00:00:00 2001 From: Gabriel Dugny Date: Wed, 27 Dec 2023 15:05:11 +0100 Subject: [PATCH] fix(slack): no fallback when missing incident type in opening modal --- src/firefighter/slack/views/modals/open.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/firefighter/slack/views/modals/open.py b/src/firefighter/slack/views/modals/open.py index 85f3489..789c9df 100644 --- a/src/firefighter/slack/views/modals/open.py +++ b/src/firefighter/slack/views/modals/open.py @@ -453,10 +453,10 @@ def get_details_modal_form_class( return incident_types[next(iter(incident_types.keys()))].get("slack_form") if incident_types and incident_type_value is not None: return incident_types[incident_type_value].get("slack_form") - logger.warning(f"No incident type found for {open_incident_context}. Fallback") - return next(iter(next(iter(INCIDENT_TYPES.values())).values())).get( - "slack_form" + logger.debug( + f"No incident type found for {open_incident_context}. No fallback." ) + return None def handle_modal_fn( # type: ignore self,