diff --git a/src/Tgstation.Server.Host/Models/DreamDaemonSettings.cs b/src/Tgstation.Server.Host/Models/DreamDaemonSettings.cs index c58642fd95..0da7f22079 100644 --- a/src/Tgstation.Server.Host/Models/DreamDaemonSettings.cs +++ b/src/Tgstation.Server.Host/Models/DreamDaemonSettings.cs @@ -1,7 +1,5 @@ using System.ComponentModel.DataAnnotations; -#nullable disable - namespace Tgstation.Server.Host.Models { /// @@ -21,6 +19,6 @@ namespace Tgstation.Server.Host.Models /// The parent . /// [Required] - public Instance Instance { get; set; } + public Instance? Instance { get; set; } } } diff --git a/src/Tgstation.Server.Host/Utils/PortAllocator.cs b/src/Tgstation.Server.Host/Utils/PortAllocator.cs index 310cfbfe3d..1aa096ab0b 100644 --- a/src/Tgstation.Server.Host/Utils/PortAllocator.cs +++ b/src/Tgstation.Server.Host/Utils/PortAllocator.cs @@ -74,14 +74,14 @@ namespace Tgstation.Server.Host.Utils var ddPorts = await databaseContext .DreamDaemonSettings .AsQueryable() - .Where(x => x.Instance.SwarmIdentifer == swarmConfiguration.Identifier) + .Where(x => x.Instance!.SwarmIdentifer == swarmConfiguration.Identifier) .Select(x => x.Port) .ToListAsync(cancellationToken); var dmPorts = await databaseContext .DreamMakerSettings .AsQueryable() - .Where(x => x.Instance.SwarmIdentifer == swarmConfiguration.Identifier) + .Where(x => x.Instance!.SwarmIdentifer == swarmConfiguration.Identifier) .Select(x => x.ApiValidationPort) .ToListAsync(cancellationToken);