Skip to content

Commit

Permalink
fix(slack): no fallback when missing incident type in opening modal
Browse files Browse the repository at this point in the history
  • Loading branch information
GabDug committed Dec 27, 2023
1 parent 0868d74 commit 619dd76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/firefighter/slack/views/modals/open.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 619dd76

Please sign in to comment.