File tree Expand file tree Collapse file tree
src/robusta/core/sinks/slack/preview Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,16 +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 next ( iter ( self .slack_custom_templates ))
23+ return self .slack_custom_templates . keys ()[ 0 ]
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 """
30- template_name = self .get_effective_template_name ()
31- if self .slack_custom_templates and template_name in self .slack_custom_templates :
32- return self .slack_custom_templates [template_name ]
30+ if self .slack_custom_templates and len (self .slack_custom_templates ) == 1 :
31+ return self .slack_custom_templates .values ()[0 ]
3332 return None
3433
3534
You can’t perform that action at this time.
0 commit comments