From c2bf4b4e2c6d1f21ed4a58f7023534a0ffac6869 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Thu, 26 Feb 2026 10:49:18 +0100 Subject: [PATCH] fix nullable reference warnings in BlockedDeviceService Co-Authored-By: Claude Sonnet 4.6 --- .../Services/BlockedDeviceService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs b/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs index da903312..8b9476c9 100644 --- a/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs +++ b/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs @@ -64,7 +64,7 @@ namespace AutopilotMonitor.Functions.Services /// /// Blocks a device for the specified duration. Updates both Table Storage and the in-memory cache. /// - public async Task BlockDeviceAsync(string tenantId, string serialNumber, int durationHours, string blockedByEmail, string reason = null) + public async Task BlockDeviceAsync(string tenantId, string serialNumber, int durationHours, string blockedByEmail, string? reason = null) { var now = DateTime.UtcNow; var unblockAt = now.AddHours(durationHours); @@ -212,12 +212,12 @@ namespace AutopilotMonitor.Functions.Services /// public class BlockedDeviceEntry { - public string TenantId { get; set; } - public string SerialNumber { get; set; } + public string TenantId { get; set; } = string.Empty; + public string SerialNumber { get; set; } = string.Empty; public DateTime BlockedAt { get; set; } public DateTime UnblockAt { get; set; } - public string BlockedByEmail { get; set; } + public string BlockedByEmail { get; set; } = string.Empty; public int DurationHours { get; set; } - public string Reason { get; set; } + public string? Reason { get; set; } } }