fix: rename Note.metadata → entity_meta (reserved by SQLAlchemy Declarative API)
SQLAlchemy reserves 'metadata' as a class attribute on declarative models. Renamed to 'entity_meta' with explicit column name 'metadata' so the DB column is unchanged but the Python attribute no longer conflicts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2043,7 +2043,7 @@ async def execute_tool(
|
||||
body="\n".join(body_lines),
|
||||
tags=["person"],
|
||||
note_type="person",
|
||||
metadata=meta,
|
||||
entity_meta=meta,
|
||||
)
|
||||
_schedule_embedding(note.id, user_id, name, note.body)
|
||||
return {"success": True, "type": "person", "data": {"id": note.id, "name": name}}
|
||||
@@ -2075,7 +2075,7 @@ async def execute_tool(
|
||||
body="\n".join(body_lines),
|
||||
tags=["place"],
|
||||
note_type="place",
|
||||
metadata=meta,
|
||||
entity_meta=meta,
|
||||
)
|
||||
_schedule_embedding(note.id, user_id, name, note.body)
|
||||
return {"success": True, "type": "place", "data": {"id": note.id, "name": name}}
|
||||
@@ -2101,7 +2101,7 @@ async def execute_tool(
|
||||
body=body,
|
||||
tags=tags,
|
||||
note_type="list",
|
||||
metadata=meta,
|
||||
entity_meta=meta,
|
||||
)
|
||||
_schedule_embedding(note.id, user_id, name, body)
|
||||
return {"success": True, "type": "list", "data": {"id": note.id, "name": name, "item_count": len(items)}}
|
||||
|
||||
Reference in New Issue
Block a user