From 86a754909da1fa26fe1daab4598588bff111514c Mon Sep 17 00:00:00 2001 From: dcore Date: Thu, 2 May 2024 16:58:46 +0200 Subject: [PATCH 1/3] Missing return statement Missing return statement makes API always return null --- lib/galaxy/webapps/galaxy/api/dynamic_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/dynamic_tools.py b/lib/galaxy/webapps/galaxy/api/dynamic_tools.py index 541b19901041..2cdf2bd141a1 100644 --- a/lib/galaxy/webapps/galaxy/api/dynamic_tools.py +++ b/lib/galaxy/webapps/galaxy/api/dynamic_tools.py @@ -40,7 +40,7 @@ def show(self, trans, id, **kwd): """ GET /api/dynamic_tools/{encoded_dynamic_tool_id|tool_uuid} """ - self._get_dynamic_tool(trans, id).to_dict() + return self._get_dynamic_tool(trans, id).to_dict() @web.require_admin @expose_api From 4c188ca5b0244c33350c3460e6f8f1e559f7f59f Mon Sep 17 00:00:00 2001 From: dcore Date: Thu, 2 May 2024 17:10:50 +0200 Subject: [PATCH 2/3] active and hidden from parameters or default There is no way of setting active and hidden from posted payload --- lib/galaxy/managers/tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/managers/tools.py b/lib/galaxy/managers/tools.py index 639fd058347b..28365e9fc1fb 100644 --- a/lib/galaxy/managers/tools.py +++ b/lib/galaxy/managers/tools.py @@ -110,6 +110,8 @@ def create_tool(self, trans, tool_payload, allow_load=True): tool_path=tool_path, tool_directory=tool_directory, uuid=uuid, + active=tool_payload.get("active", True), + hidden=tool_payload.get("hidden", True), value=representation, ) self.app.toolbox.load_dynamic_tool(dynamic_tool) From 06580888f10e417fbabb9410caa9854c0d745791 Mon Sep 17 00:00:00 2001 From: dcore Date: Fri, 3 May 2024 16:52:54 +0200 Subject: [PATCH 3/3] Update tools.py Remove redundant defaults. --- lib/galaxy/managers/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/managers/tools.py b/lib/galaxy/managers/tools.py index 28365e9fc1fb..c6dbe471dc84 100644 --- a/lib/galaxy/managers/tools.py +++ b/lib/galaxy/managers/tools.py @@ -110,8 +110,8 @@ def create_tool(self, trans, tool_payload, allow_load=True): tool_path=tool_path, tool_directory=tool_directory, uuid=uuid, - active=tool_payload.get("active", True), - hidden=tool_payload.get("hidden", True), + active=tool_payload.get("active"), + hidden=tool_payload.get("hidden"), value=representation, ) self.app.toolbox.load_dynamic_tool(dynamic_tool)