diff --git a/mcp-server/src/legal_mcp/services/db.py b/mcp-server/src/legal_mcp/services/db.py index 8e8ad1c..f4207b3 100644 --- a/mcp-server/src/legal_mcp/services/db.py +++ b/mcp-server/src/legal_mcp/services/db.py @@ -2096,7 +2096,17 @@ async def update_halacha( if not set_parts: return None set_parts.append("updated_at = now()") - sql = f"UPDATE halachot SET {', '.join(set_parts)} WHERE id = $1 RETURNING *" + # Exclude `embedding` — it's a numpy.ndarray of np.float32 that breaks + # FastAPI's jsonable_encoder downstream (PATCH /api/halachot/{id}). + # Callers that need it (none today) can re-fetch with get_halacha. + sql = f""" + UPDATE halachot SET {', '.join(set_parts)} WHERE id = $1 + RETURNING id, case_law_id, halacha_index, rule_statement, rule_type, + reasoning_summary, supporting_quote, page_reference, + practice_areas, subject_tags, cites, confidence, + quote_verified, review_status, reviewer, reviewed_at, + created_at, updated_at + """ row = await pool.fetchrow(sql, *params) return dict(row) if row else None