diff options
Diffstat (limited to 'wqflask/wqflask/partial_correlations_views.py')
-rw-r--r-- | wqflask/wqflask/partial_correlations_views.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/partial_correlations_views.py b/wqflask/wqflask/partial_correlations_views.py index 91948722..b3ebc4c5 100644 --- a/wqflask/wqflask/partial_correlations_views.py +++ b/wqflask/wqflask/partial_correlations_views.py @@ -3,6 +3,7 @@ import math import requests from functools import reduce from typing import Union, Tuple +from urllib.parse import urljoin from flask import ( flash, @@ -287,7 +288,7 @@ def partial_correlations(): "with_target_db": args["with_target_db"] } return handle_response(requests.post( - url=f"{GN_SERVER_URL}/correlation/partial", + url=urljoin(GN_SERVER_URL, "correlation/partial"), json=post_data)) for error in args["errors"]: @@ -302,7 +303,7 @@ def partial_correlations(): "with_target_db": args["with_target_db"] } return handle_response(requests.post( - url=f"{GN_SERVER_URL}/correlation/partial", + url=urljoin(GN_SERVER_URL, "correlation/partial"), json=post_data)) for error in args["errors"]: @@ -347,7 +348,7 @@ def process_pcorrs_command_output(result): @app.route("/partial_correlations/<command_id>", methods=["GET"]) def poll_partial_correlation_results(command_id): response = requests.get( - url=f"{GN_SERVER_URL}/async_commands/state/{command_id}") + url=urljoin(GN_SERVER_URL, "async_commands/state/{command_id}")) if response.status_code == 200: data = response.json() |