Skip to content

Commit

Permalink
Merge pull request #19011 from jmchilton/fix_extra_call_to_test_data_…
Browse files Browse the repository at this point in the history
…path

[24.1] Fix extra call to test_data_path that requires an admin key
  • Loading branch information
jmchilton authored Oct 17, 2024
2 parents d1d846f + 569eeb3 commit 666ab5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/galaxy/tool_util/verify/interactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 666ab5e

Please sign in to comment.