File tree Expand file tree Collapse file tree
elementary/monitor/data_monitoring/alerts/integrations/slack Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,21 +362,12 @@ def _get_elementary_test_template(
362362 )
363363
364364 if DESCRIPTION_FIELD in (alert .alert_fields or DEFAULT_ALERT_FIELDS ):
365- if alert .test_description :
366- preview .extend (
367- [
368- self .message_builder .create_text_section_block ("*Description*" ),
369- self .message_builder .create_context_block (
370- [alert .test_description ]
371- ),
372- ]
373- )
374- else :
375- preview .append (
376- self .message_builder .create_text_section_block (
377- "*Description*\n _No description_"
378- )
365+ description_text = alert .test_description or "_No description_"
366+ preview .append (
367+ self .message_builder .create_text_section_block (
368+ f"*Description*\n { description_text } "
379369 )
370+ )
380371
381372 result = []
382373 if (
You can’t perform that action at this time.
0 commit comments