Skip to content

Commit 0965a67

Browse files
committed
fix: handle missing coordinates
1 parent e9f7906 commit 0965a67

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/biodata_cache/cache_table_helpers/scientist/scientist_rl_fib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ def _extract_coordinates(config: dict) -> str:
7171
if item.get("object_type") == "Translation":
7272
t = item.get("translation") or []
7373
if len(t) >= 4:
74-
return f"AP={t[0]}, ML={float(t[1])}, D={t[3]}"
74+
ap = t[0] if t[0] is not None else "?"
75+
ml = float(t[1]) if t[1] is not None else "?"
76+
d = t[3] if t[3] is not None else "?"
77+
return f"AP={ap}, ML={ml}, D={d}"
7578
return "missing"
7679

7780

0 commit comments

Comments
 (0)