Skip to content

Commit 0a9403e

Browse files
committed
TD-3741 - LMS server issue related to active content cache is null.
1 parent 7f058d9 commit 0a9403e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

LearningHub.Nhs.WebUI/Controllers/Api/ScormController.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ private async Task<bool> Commit(SCO scoObject)
230230
try
231231
{
232232
var activeContent = this.userService.GetActiveContentAsync().Result;
233+
if (activeContent.Count == 0)
234+
{
235+
return false;
236+
}
237+
233238
if (!activeContent.Any(ac => ac.ScormActivityId == scoObject.InstanceId))
234239
{
235240
throw new Exception($"User does not have ActiveContent for ScormActivityId={scoObject.InstanceId}");

0 commit comments

Comments
 (0)