Skip to content

Commit 87dea41

Browse files
committed
bug caused by serialisation fixed
1 parent fb82459 commit 87dea41

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Verification_Engine/Query/ReportMessage.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using BH.oM.Base;
1+
using BH.Engine.Diffing;
2+
using BH.oM.Base;
23
using BH.oM.Verification;
34
using BH.oM.Verification.Conditions;
45
using BH.oM.Verification.Reporting;
@@ -115,11 +116,7 @@ public static string ReportMessage(this ILogicalCollectionCondition condition, L
115116
{
116117
ICondition subCondition = condition.Conditions[i];
117118
IConditionResult subResult = result.Results[i];
118-
119-
//TODO: will dictionary work after deserialisation??
120-
IConditionReportingConfig subConfig = null;
121-
if (config?.NestedConfigs != null)
122-
config.NestedConfigs.TryGetValue(subCondition, out subConfig);
119+
IConditionReportingConfig subConfig = config?.NestedConfigs?.FirstOrDefault(x => x.Key.IsEqual(subCondition)).Value;
123120

124121
string subReport = subCondition.IReportMessage(subResult, subConfig);
125122
if ((bool)subResult.Passed)

0 commit comments

Comments
 (0)