From f095158c09d6f60aa51a41d378aade37a91378b2 Mon Sep 17 00:00:00 2001 From: MrKevJoy <60096576+MrKevJoy@users.noreply.github.com> Date: Fri, 3 Nov 2023 11:23:19 +0000 Subject: [PATCH] fix when programme type is null (#900) --- ...DataverseAdapter.SetIttResultForTeacher.cs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.Core/Dqt/DataverseAdapter.SetIttResultForTeacher.cs b/TeachingRecordSystem/src/TeachingRecordSystem.Core/Dqt/DataverseAdapter.SetIttResultForTeacher.cs index 73dd4f9d9..b9fc734f1 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.Core/Dqt/DataverseAdapter.SetIttResultForTeacher.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.Core/Dqt/DataverseAdapter.SetIttResultForTeacher.cs @@ -382,17 +382,20 @@ await Task.WhenAll( } else { - switch (itt.dfeta_Result) + if (itt.dfeta_ProgrammeType.HasValue) { - case dfeta_ITTResult.InTraining: - case dfeta_ITTResult.Withdrawn: - case dfeta_ITTResult.Deferred: - case dfeta_ITTResult.Pass: - case dfeta_ITTResult.Fail: - { - matching.Add(itt); - break; - } + switch (itt.dfeta_Result) + { + case dfeta_ITTResult.InTraining: + case dfeta_ITTResult.Withdrawn: + case dfeta_ITTResult.Deferred: + case dfeta_ITTResult.Pass: + case dfeta_ITTResult.Fail: + { + matching.Add(itt); + break; + } + } } } }