From 850e5d2b41810f9bb95bdd71a122417435ff717a Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Mon, 16 Feb 2026 12:41:04 +0100 Subject: [PATCH] final fix null ref --- .../AutopilotMonitor.Functions/Services/RuleEngine.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Backend/AutopilotMonitor.Functions/Services/RuleEngine.cs b/src/Backend/AutopilotMonitor.Functions/Services/RuleEngine.cs index 436982a0..9343cc2c 100644 --- a/src/Backend/AutopilotMonitor.Functions/Services/RuleEngine.cs +++ b/src/Backend/AutopilotMonitor.Functions/Services/RuleEngine.cs @@ -248,15 +248,15 @@ namespace AutopilotMonitor.Functions.Services { var worst = groups.OrderByDescending(g => g.Count()).First(); var firstEvent = worst.First().Event; - var groupKey = worst.Key; - var appName = GetDataFieldValue(firstEvent, "appName") ?? groupKey; + string groupKey = worst.Key ?? string.Empty; + string appName = GetDataFieldValue(firstEvent, "appName") ?? groupKey; return (true, new Dictionary { ["eventId"] = firstEvent.EventId ?? string.Empty, ["sequence"] = firstEvent.Sequence, - ["timestamp"] = (object?)firstEvent.Timestamp ?? string.Empty, - ["groupKey"] = groupKey ?? string.Empty, - ["appName"] = appName ?? groupKey ?? string.Empty, + ["timestamp"] = firstEvent.Timestamp, + ["groupKey"] = groupKey, + ["appName"] = appName, ["count"] = worst.Count(), ["threshold"] = groupThreshold });