From a66215595fbca124a1a37d7d4ed4d32d46fa0a8b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 15 Jan 2024 10:33:37 +0100 Subject: [PATCH] Fix any type for tool_data_file_path --- client/src/api/schema/schema.ts | 2 +- lib/galaxy/webapps/galaxy/api/tool_data.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index 6175fdc94d4b..5eb4618ed34a 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -19471,7 +19471,7 @@ export interface operations { /** Import a data manager bundle */ parameters?: { query?: { - tool_data_file_path?: Record; + tool_data_file_path?: string | null; }; /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ header?: { diff --git a/lib/galaxy/webapps/galaxy/api/tool_data.py b/lib/galaxy/webapps/galaxy/api/tool_data.py index cf758dc1e135..953c2909e510 100644 --- a/lib/galaxy/webapps/galaxy/api/tool_data.py +++ b/lib/galaxy/webapps/galaxy/api/tool_data.py @@ -1,3 +1,5 @@ +from typing import Optional + from fastapi import ( Body, Path, @@ -66,7 +68,7 @@ async def index(self) -> ToolDataEntryList: require_admin=True, ) async def create( - self, tool_data_file_path=None, import_bundle_model: ImportToolDataBundle = Body(...) + self, tool_data_file_path: Optional[str] = None, import_bundle_model: ImportToolDataBundle = Body(...) ) -> AsyncTaskResultSummary: source = import_bundle_model.source result = import_data_bundle.delay(tool_data_file_path=tool_data_file_path, **source.model_dump())