File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
graphdatascience/query_runner Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,6 @@ def __init__(
9696
9797 if auth :
9898 self ._auth_middleware = AuthMiddleware (auth )
99- if not self ._user_agent :
100- self ._user_agent = f"neo4j-graphdatascience-v{ __version__ } pyarrow-v{ arrow_version } "
10199
102100 self ._flight_client = self ._instantiate_flight_client ()
103101
@@ -109,9 +107,13 @@ def _instantiate_flight_client(self) -> flight.FlightClient:
109107 )
110108 client_options : dict [str , Any ] = {"disable_server_verification" : self ._disable_server_verification }
111109 if self ._auth :
110+ user_agent = f"neo4j-graphdatascience-v{ __version__ } pyarrow-v{ arrow_version } "
111+ if self ._user_agent :
112+ user_agent = self ._user_agent
113+
112114 client_options ["middleware" ] = [
113115 AuthFactory (self ._auth_middleware ),
114- UserAgentFactory (useragent = self . _user_agent ),
116+ UserAgentFactory (useragent = user_agent ),
115117 ]
116118 if self ._tls_root_certs :
117119 client_options ["tls_root_certs" ] = self ._tls_root_certs
You can’t perform that action at this time.
0 commit comments