We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 586d81e commit a91dc03Copy full SHA for a91dc03
1 file changed
src/alerts/alert_structs.rs
@@ -216,13 +216,15 @@ impl Conditions {
216
.map(Self::format_condition)
217
.collect();
218
219
- // Format nested groups recursively
+ // Format nested groups recursively, skipping empty ones
220
let group_parts: Vec<String> = self
221
.groups
222
.as_deref()
223
.unwrap_or_default()
224
.iter()
225
- .map(|g| format!("({})", g.generate_filter_message()))
+ .map(|g| g.generate_filter_message())
226
+ .filter(|msg| !msg.is_empty())
227
+ .map(|msg| format!("({msg})"))
228
229
230
let all_parts: Vec<&str> = condition_parts
0 commit comments