Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cognee/infrastructure/databases/graph/get_graph_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,21 @@ def create_graph_engine(
Wrapper function to call create graph engine with caching.
For a detailed description, see _create_graph_engine.
"""
# Normalize empty/None port before the lru_cache boundary to avoid
# duplicate cache entries for "" vs None.
normalized_port = (
None
if graph_database_port in ("", None)
else graph_database_port
)
return _create_graph_engine(
graph_database_provider,
graph_file_path,
graph_database_url,
graph_database_name,
graph_database_username,
graph_database_password,
graph_database_port,
normalized_port,
graph_database_key,
graph_dataset_database_handler,
)
Expand Down