From 1cb083031039f7e2273bb6c8757f703136549f86 Mon Sep 17 00:00:00 2001 From: Oluwatobi Awe Date: Wed, 5 Jun 2024 01:32:35 +0100 Subject: [PATCH] TD-3023 wsi auto archiving fix --- LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs | 2 +- WebAPI/LearningHub.Nhs.Services/ResourceService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs b/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs index a97470538..6bfbcca6c 100644 --- a/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs @@ -861,7 +861,7 @@ private Dictionary CheckQuestionBlock(BlockCollectionViewModel mode { foreach (var wsi in existingWholeSlideImages) { - if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null && wsi.WholeSlideImage.File.WholeSlideImageFile != null) + if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null && wsi.WholeSlideImage.File.FileId > 0) { filePath.Add(wsi.WholeSlideImage.File.FileId, wsi.WholeSlideImage.File.FilePath); } diff --git a/WebAPI/LearningHub.Nhs.Services/ResourceService.cs b/WebAPI/LearningHub.Nhs.Services/ResourceService.cs index 491028d39..a97546303 100644 --- a/WebAPI/LearningHub.Nhs.Services/ResourceService.cs +++ b/WebAPI/LearningHub.Nhs.Services/ResourceService.cs @@ -5135,7 +5135,7 @@ private Dictionary CheckQuestionBlock(BlockCollectionViewModel mode { foreach (var wsi in existingWholeSlideImages) { - if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null && wsi.WholeSlideImage.File.WholeSlideImageFile != null) + if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null && wsi.WholeSlideImage.File.FileId > 0) { filePath.Add(wsi.WholeSlideImage.File.FileId, wsi.WholeSlideImage.File.FilePath); }