Skip to content

Commit edd0cbd

Browse files
committed
fixing
1 parent d4a85a1 commit edd0cbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/robusta/core/sinks/slack/preview/slack_sink_preview_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ def get_effective_template_name(self) -> str:
2020
Otherwise, use 'legacy.j2' if template_style is legacy, else 'header.j2'.
2121
"""
2222
if self.slack_custom_templates and len(self.slack_custom_templates) == 1:
23-
return self.slack_custom_templates.keys()[0]
23+
return next(iter(self.slack_custom_templates))
2424
return "header.j2"
2525

2626
def get_custom_template(self) -> Optional[str]:
2727
"""
2828
Returns the custom template string for the effective template name, if it exists.
2929
"""
3030
if self.slack_custom_templates and len(self.slack_custom_templates) == 1:
31-
return self.slack_custom_templates.values()[0]
31+
return next(iter(self.slack_custom_templates))
3232
return None
3333

3434

0 commit comments

Comments
 (0)