Skip to content

Commit fcd9414

Browse files
author
Bob Strahan
committed
fix: add direct confidence check for top-level attributes in assessment service
1 parent 186f350 commit fcd9414

File tree

1 file changed

+15
-0
lines changed
  • lib/idp_common_pkg/idp_common/assessment

1 file changed

+15
-0
lines changed

lib/idp_common_pkg/idp_common/assessment/service.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,21 @@ def _check_confidence_alerts(
309309
)
310310
return
311311

312+
# First check if this assessment_data itself is a direct confidence assessment
313+
if "confidence" in assessment_data:
314+
confidence = _safe_float_conversion(
315+
assessment_data.get("confidence", 0.0), 0.0
316+
)
317+
if confidence < threshold:
318+
alerts_list.append(
319+
{
320+
"attribute_name": attr_name,
321+
"confidence": confidence,
322+
"confidence_threshold": threshold,
323+
}
324+
)
325+
326+
# Then check for nested sub-attributes (for group/complex attributes)
312327
for sub_attr_name, sub_assessment in assessment_data.items():
313328
if isinstance(sub_assessment, dict) and "confidence" in sub_assessment:
314329
confidence = _safe_float_conversion(

0 commit comments

Comments
 (0)