diff --git a/Api.SeaHavenIndustries.Tests/WorkOrderUpliftServiceConflictTests.cs b/Api.SeaHavenIndustries.Tests/WorkOrderUpliftServiceConflictTests.cs index 9325b3d..d9a503c 100644 --- a/Api.SeaHavenIndustries.Tests/WorkOrderUpliftServiceConflictTests.cs +++ b/Api.SeaHavenIndustries.Tests/WorkOrderUpliftServiceConflictTests.cs @@ -56,6 +56,10 @@ public sealed class WorkOrderUpliftServiceConflictTests .ReturnsAsync(0m); upliftData.Setup(x => x.StageAsync(It.IsAny(), It.IsAny())) .Returns(Task.CompletedTask); + upliftData.Setup(x => x.GetEvidenceFilesAsync( + It.IsAny>(), + It.IsAny())) + .ReturnsAsync(new Dictionary>()); upliftData.Setup(x => x.SaveChangesAsync(It.IsAny())) .Returns(async () => { diff --git a/SeaHaven.Services/Implementation/WorkOrderUpliftService.cs b/SeaHaven.Services/Implementation/WorkOrderUpliftService.cs index 9421182..0e3af52 100644 --- a/SeaHaven.Services/Implementation/WorkOrderUpliftService.cs +++ b/SeaHaven.Services/Implementation/WorkOrderUpliftService.cs @@ -469,7 +469,8 @@ namespace SeaHaven.Services.Implementation Dispatch dispatch, CancellationToken cancellationToken) { - var files = await _upliftData.GetEvidenceFilesAsync(new[] { request.Id }, cancellationToken); + var files = await _upliftData.GetEvidenceFilesAsync(new[] { request.Id }, cancellationToken) + ?? new Dictionary>(); if (!files.TryGetValue(request.Id, out var attachments)) attachments = Array.Empty();