mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
fix get_entity with content if there is no frontmatter
This commit is contained in:
@@ -80,9 +80,11 @@ class FileService:
|
||||
# For notes, read the actual file content
|
||||
file_path = self.get_entity_path(entity)
|
||||
content, _ = await self.read_file(file_path)
|
||||
# Strip frontmatter from content
|
||||
_, _, content = content.split("---", 2)
|
||||
return content.strip()
|
||||
if "---" in content:
|
||||
# Strip frontmatter from content
|
||||
_, _, content = content.split("---", 2)
|
||||
content = content.strip()
|
||||
return content
|
||||
|
||||
|
||||
async def delete_entity_file(self, entity: EntityModel) -> None:
|
||||
|
||||
Reference in New Issue
Block a user