Skip to content

Commit

Permalink
Merge pull request #16561 from davelopez/fix_install_tools_from_admin…
Browse files Browse the repository at this point in the history
…_panel

Fix: serialize `tool_shed_urls` directly from the API
  • Loading branch information
mvdbeek authored Aug 17, 2023
2 parents e32836b + f14fd25 commit 1c04cd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/galaxy/managers/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,9 @@ def _defaults_to(default):
"user_library_import_dir": _defaults_to(None),
"allow_library_path_paste": _defaults_to(False),
"allow_user_deletion": _defaults_to(False),
"tool_shed_urls": self._serialize_tool_shed_urls,
}
)

def _serialize_tool_shed_urls(self, item: Any, key: str, **context) -> List[str]:
return list(self.app.tool_shed_registry.tool_sheds.values()) if self.app.tool_shed_registry else []
3 changes: 0 additions & 3 deletions lib/galaxy/webapps/base/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ def _get_extended_config(self, trans):
"enable_webhooks": True if trans.app.webhooks_registry.webhooks else False,
"message_box_visible": trans.app.config.message_box_visible,
"show_inactivity_warning": trans.app.config.user_activation_on and trans.user and not trans.user.active,
"tool_shed_urls": list(trans.app.tool_shed_registry.tool_sheds.values())
if trans.app.tool_shed_registry
else [],
"tool_dynamic_configs": list(trans.app.toolbox.dynamic_conf_filenames()),
}

Expand Down
1 change: 1 addition & 0 deletions lib/galaxy_test/api/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"user_library_import_dir",
"allow_library_path_paste",
"allow_user_deletion",
"tool_shed_urls",
]


Expand Down

0 comments on commit 1c04cd4

Please sign in to comment.