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);