diff --git a/ess/src/API/EMBC.ESS/Resources/Evacuations/EvacuationRepository.cs b/ess/src/API/EMBC.ESS/Resources/Evacuations/EvacuationRepository.cs index 4e8fe0e29..dd4db074b 100644 --- a/ess/src/API/EMBC.ESS/Resources/Evacuations/EvacuationRepository.cs +++ b/ess/src/API/EMBC.ESS/Resources/Evacuations/EvacuationRepository.cs @@ -139,7 +139,7 @@ public async Task Update(EssContext essContext, EvacuationFile evacuatio AddNeedsAssessment(essContext, file, file.era_CurrentNeedsAssessmentid); - AssignToTask(essContext, file, evacuationFile.TaskId ?? currentFile.era_TaskId.era_name); + AssignToTask(essContext, file, evacuationFile.TaskId ?? currentFile.era_TaskId?.era_name); await essContext.SaveChangesAsync(ct);