From 569eeb3086dff25d507dc68c7fa7ed278145c019 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 16 Oct 2024 12:08:56 -0400 Subject: [PATCH] Fix extra call to test_data_path that requires an admin key --- lib/galaxy/tool_util/verify/interactor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/verify/interactor.py b/lib/galaxy/tool_util/verify/interactor.py index b51e2a33ad5a..08525860a000 100644 --- a/lib/galaxy/tool_util/verify/interactor.py +++ b/lib/galaxy/tool_util/verify/interactor.py @@ -560,7 +560,7 @@ def stage_data_async( file_name = None file_name_exists = False location = self._ensure_valid_location_in(test_data) - if fname: + if fname and force_path_paste: file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) file_name_exists = os.path.exists(f"{file_name}") upload_from_location = not file_name_exists and location is not None @@ -575,7 +575,8 @@ def stage_data_async( if upload_from_location: tool_input.update({"files_0|url_paste": location}) elif force_path_paste: - file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) + if file_name is None: + file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) tool_input.update({"files_0|url_paste": f"file://{file_name}"}) else: file_content = self.test_data_download(tool_id, fname, is_output=False, tool_version=tool_version)