From 1111822e181d9c76705a44ccfaacfcad699b0f99 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 1 Jul 2024 01:03:05 -0400 Subject: [PATCH] Fix unit test. --- lib/galaxy/tool_util/toolbox/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/toolbox/base.py b/lib/galaxy/tool_util/toolbox/base.py index 03eae4522a4d..3f50c28cecea 100644 --- a/lib/galaxy/tool_util/toolbox/base.py +++ b/lib/galaxy/tool_util/toolbox/base.py @@ -239,7 +239,12 @@ def to_model(self) -> ToolPanelViewModel: self._save_integrated_tool_panel() def _default_panel_view(self, trans): - return self.app.config.config_value_for_host("default_panel_view", trans.host) or self.__default_panel_view + config = self.app.config + if hasattr(config, "config_value_for_host"): + config_value = config.config_value_for_host("default_panel_view", trans.host) + else: + config_value = getattr(config, "default_panel_view", None) + return config_value or self.__default_panel_view def create_tool(self, config_file, tool_shed_repository=None, guid=None, **kwds): raise NotImplementedError()