Improve handling of alerts when no active alerts are present

This commit is contained in:
2026-05-29 19:34:23 -05:00
parent 26e6f33cde
commit 3e93a97d10
10 changed files with 126 additions and 11 deletions

View File

@@ -56,10 +56,12 @@ func BuildStorm(ctx BuildContext) (Package, error) {
Discussion: buildDiscussion(ctx.Bundle.Discussion),
WeatherStory: buildWeatherStory(ctx.Bundle),
}
return Package{
pkg := Package{
Metadata: BuildMetadata(ctx),
Storm: storm,
}, nil
}
setRelevantAlertCount(&pkg.Metadata, len(alerts))
return pkg, nil
}
func stormHeadlines(alerts []forecast.AlertOverlap) []string {