From f9a523f1bbae1c9312230624b70787310cd9f0c1 Mon Sep 17 00:00:00 2001 From: Oluwatobi Awe Date: Tue, 14 May 2024 16:15:13 +0100 Subject: [PATCH] TD-3023 wsi null filter --- .../ResourceService.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.Services/ResourceService.cs b/WebAPI/LearningHub.Nhs.Services/ResourceService.cs index e040a21c8..68342eda7 100644 --- a/WebAPI/LearningHub.Nhs.Services/ResourceService.cs +++ b/WebAPI/LearningHub.Nhs.Services/ResourceService.cs @@ -5060,13 +5060,13 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) if (questionBlock.MediaBlock.Video != null) { - if (questionBlock.MediaBlock.Video.File != null) - { - filePath.Add(questionBlock.MediaBlock.Video.File.FilePath); - } - if (questionBlock.MediaBlock.Video.VideoFile != null) { + if (questionBlock.MediaBlock.Video.File != null) + { + filePath.Add(questionBlock.MediaBlock.Video.File.FilePath); + } + if (questionBlock.MediaBlock.Video.VideoFile.TranscriptFile != null) { filePath.Add(questionBlock.MediaBlock.Video.VideoFile.TranscriptFile.File.FilePath); @@ -5086,7 +5086,7 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) { foreach (var wsi in existingWholeSlideImages) { - if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null) + if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null && wsi.WholeSlideImage.File.WholeSlideImageFile != null) { filePath.Add(wsi.WholeSlideImage.File.FilePath); } @@ -5110,13 +5110,13 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) if (feedbackBlock.MediaBlock.Video != null) { - if (feedbackBlock.MediaBlock.Video.File != null) - { - filePath.Add(feedbackBlock.MediaBlock.Video.File.FilePath); - } - if (feedbackBlock.MediaBlock.Video.VideoFile != null) { + if (feedbackBlock.MediaBlock.Video.File != null) + { + filePath.Add(feedbackBlock.MediaBlock.Video.File.FilePath); + } + if (feedbackBlock.MediaBlock.Video.VideoFile.TranscriptFile != null) { filePath.Add(feedbackBlock.MediaBlock.Video.VideoFile.TranscriptFile.File.FilePath);