mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
chore: rename entity_type to note_type (#600)
Signed-off-by: phernandez <paul@basicmachines.co> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -255,8 +255,8 @@ class EntityParser:
|
||||
else:
|
||||
metadata["title"] = title
|
||||
|
||||
entity_type = metadata.get("type")
|
||||
metadata["type"] = entity_type if entity_type is not None else "note"
|
||||
note_type = metadata.get("type")
|
||||
metadata["type"] = note_type if note_type is not None else "note"
|
||||
|
||||
tags = parse_tags(metadata.get("tags", [])) # pyright: ignore
|
||||
if tags:
|
||||
|
||||
@@ -50,7 +50,7 @@ def entity_model_from_markdown(
|
||||
|
||||
# Update basic fields
|
||||
model.title = markdown.frontmatter.title
|
||||
model.entity_type = markdown.frontmatter.type
|
||||
model.note_type = markdown.frontmatter.type
|
||||
# Only update permalink if it exists in frontmatter, otherwise preserve existing
|
||||
if markdown.frontmatter.permalink is not None:
|
||||
model.permalink = markdown.frontmatter.permalink
|
||||
@@ -86,7 +86,7 @@ async def schema_to_markdown(schema: Any) -> Post:
|
||||
Convert schema to markdown Post object.
|
||||
|
||||
Args:
|
||||
schema: Schema to convert (must have title, entity_type, and permalink attributes)
|
||||
schema: Schema to convert (must have title, note_type, and permalink attributes)
|
||||
|
||||
Returns:
|
||||
Post object with frontmatter metadata
|
||||
@@ -113,7 +113,7 @@ async def schema_to_markdown(schema: Any) -> Post:
|
||||
post = Post(
|
||||
content,
|
||||
title=schema.title,
|
||||
type=schema.entity_type,
|
||||
type=schema.note_type,
|
||||
)
|
||||
# set the permalink if passed in
|
||||
if schema.permalink:
|
||||
|
||||
Reference in New Issue
Block a user