fix(neo4j): import basic_auth directly, not neo4j.basic_auth
This commit is contained in:
parent
05a81c0d4d
commit
6ef3b694ce
1 changed files with 2 additions and 2 deletions
|
|
@ -155,10 +155,10 @@ class CatalogService:
|
|||
|
||||
# Neo4j (NEO4J_AUTH=none means no password)
|
||||
try:
|
||||
from neo4j import GraphDatabase
|
||||
from neo4j import GraphDatabase, basic_auth
|
||||
|
||||
cfg = self.config["neo4j"]
|
||||
auth = neo4j.basic_auth(cfg["user"], cfg["password"]) if cfg["password"] else None
|
||||
auth = basic_auth(cfg["user"], cfg["password"]) if cfg["password"] else None
|
||||
self._neo_driver = GraphDatabase.driver(cfg["uri"], auth=auth)
|
||||
with self._neo_driver.session() as s:
|
||||
s.run("RETURN 1").consume()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue