From 42b06cb7aa3a1d6139967f26bce774267e2f80fc Mon Sep 17 00:00:00 2001 From: Oluwatobi Awe Date: Wed, 15 May 2024 11:56:02 +0100 Subject: [PATCH] TD-3023 exclude wsi that are still processing. --- LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs | 2 +- WebAPI/LearningHub.Nhs.Services/ResourceService.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs b/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs index 57fa075d3..b5c555b08 100644 --- a/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs @@ -855,7 +855,7 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) { 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.WholeSlideImageFile != null && (wsi.WholeSlideImage.File.WholeSlideImageFile.Status == WholeSlideImageFileStatus.ProcessingComplete || wsi.WholeSlideImage.File.WholeSlideImageFile.Status == WholeSlideImageFileStatus.ProcessingFailed)) { filePath.Add(wsi.WholeSlideImage.File.FilePath); } diff --git a/WebAPI/LearningHub.Nhs.Services/ResourceService.cs b/WebAPI/LearningHub.Nhs.Services/ResourceService.cs index 68342eda7..67f233123 100644 --- a/WebAPI/LearningHub.Nhs.Services/ResourceService.cs +++ b/WebAPI/LearningHub.Nhs.Services/ResourceService.cs @@ -29,6 +29,7 @@ namespace LearningHub.Nhs.Services using LearningHub.Nhs.Models.Resource.AzureMediaAsset; using LearningHub.Nhs.Models.Resource.Blocks; using LearningHub.Nhs.Models.Resource.Contribute; + using LearningHub.Nhs.Models.Resource.Files; using LearningHub.Nhs.Models.Resource.ResourceDisplay; using LearningHub.Nhs.Models.Validation; using LearningHub.Nhs.Repository; @@ -5086,7 +5087,7 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) { 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.WholeSlideImageFile != null && (wsi.WholeSlideImage.File.WholeSlideImageFile.Status == WholeSlideImageFileStatus.ProcessingComplete || wsi.WholeSlideImage.File.WholeSlideImageFile.Status == WholeSlideImageFileStatus.ProcessingFailed)) { filePath.Add(wsi.WholeSlideImage.File.FilePath); }