Skip to content

Commit 4c70efd

Browse files
committed
Say where repair data reads references differently from validation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qm4PkMsSN3FVpzvBdZYahC
1 parent c3545d3 commit 4c70efd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/linkml_reference_validator/cli/repair.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,12 @@ def _extract_from_dict(d: dict, path: str = ""):
410410
# Look for evidence patterns
411411
if isinstance(d, dict):
412412
# Direct evidence item pattern. The reference may be an inlined
413-
# object, read as the validation plugin reads it (#138).
413+
# object, whose id is read with the validation plugin's own
414+
# extract_reference_id (#138). Unlike validation, a repair needs
415+
# exactly one source, so a list of references is skipped below, and
416+
# each key is tried in turn, so a reference object with no id does
417+
# not hide a usable reference_id beside it.
414418
ref_value = d.get("reference") or d.get("reference_id")
415-
# Each key in turn, so a reference object with no id does not hide
416-
# a usable reference_id beside it.
417419
ref = extract_reference_id(d.get("reference")) or extract_reference_id(
418420
d.get("reference_id")
419421
)

0 commit comments

Comments
 (0)