mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-19 17:45:25 +00:00
BUGFIX: redis vector store overwrites falsey metadata (#13652)
- **Description:** This commit fixed the problem that Redis vector store will change the value of a metadata from 0 to empty when saving the document, which should be an un-intended behavior. - **Issue:** N/A - **Dependencies:** N/A
This commit is contained in:
parent
a21e84faf7
commit
d47ee1ae79
@ -1381,7 +1381,7 @@ def _prepare_metadata(metadata: Dict[str, Any]) -> Dict[str, Any]:
|
||||
|
||||
clean_meta: Dict[str, Union[str, float, int]] = {}
|
||||
for key, value in metadata.items():
|
||||
if not value:
|
||||
if value is None:
|
||||
clean_meta[key] = ""
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user