diff --git a/PLATER/services/util/api_utils.py b/PLATER/services/util/api_utils.py index d076073..185a3be 100644 --- a/PLATER/services/util/api_utils.py +++ b/PLATER/services/util/api_utils.py @@ -11,15 +11,16 @@ def get_graph_interface(): """Get graph interface.""" + neo4j_protocol = config.get('NEO4J_CONNECTION_PROTOCOL', 'bolt') return GraphInterface( host=config.get('NEO4J_HOST'), - port=config.get('NEO4J_HTTP_PORT'), + port=config.get('NEO4J_HTTP_PORT') if neo4j_protocol == 'http' else config.get('NEO4J_BOLT_PORT'), auth=( config.get('NEO4J_USERNAME'), config.get('NEO4J_PASSWORD') ), query_timeout=int(config.get('NEO4J_QUERY_TIMEOUT')), - protocol=config.get('NEO4J_CONNECTION_PROTOCOL', 'bolt'), + protocol=neo4j_protocol, bl_version=config.get('BL_VERSION') )