Skip to content

Commit 01774db

Browse files
committed
TD-3713 Addressing test fail for the case when only admin account is present
1 parent 66d8aed commit 01774db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DigitalLearningSolutions.Web/Controllers/LoginController.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ int centreIdToLogInto
227227
IssuedUtc = clockUtility.UtcNow,
228228
};
229229
var centreAccountSet = userEntity?.GetCentreAccountSet(centreIdToLogInto);
230-
loginService.UpdateLastAccessedForDelegatesAccountsTable(centreAccountSet.DelegateAccount.Id);
230+
231+
if (centreAccountSet?.DelegateAccount?.Id != null)
232+
{
233+
loginService.UpdateLastAccessedForDelegatesAccountsTable(centreAccountSet.DelegateAccount.Id);
234+
}
231235

232236
var adminAccount = centreAccountSet?.AdminAccount;
233237
if (adminAccount?.Active == true)

0 commit comments

Comments
 (0)