Skip to content

Commit

Permalink
Fixes 'Nonetype' not iterable for ObsidianLoader (#12751)
Browse files Browse the repository at this point in the history
Implements #12726 from @Di3mex
  • Loading branch information
efriis authored Nov 1, 2023
1 parent 67b6f4d commit da82132
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/langchain/langchain/document_loaders/obsidian.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def load(self) -> List[Document]:
}

if tags or front_matter.get("tags"):
metadata["tags"] = ",".join(tags | set(front_matter.get("tags", [])))
metadata["tags"] = ",".join(
tags | set(front_matter.get("tags", []) or [])
)

docs.append(Document(page_content=text, metadata=metadata))

Expand Down

0 comments on commit da82132

Please sign in to comment.