From 5c6c9ef5b48fe34fe167ded8dddecd79cabd2803 Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 15 Aug 2023 10:22:36 -0400 Subject: [PATCH] Add session attr to Bunch to facilitate app.model.session This Bunch object already has `context`; however we access the session using both attrs. --- lib/galaxy/tools/remote_tool_eval.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/remote_tool_eval.py b/lib/galaxy/tools/remote_tool_eval.py index 074a99f17e97..175a1878eb3a 100644 --- a/lib/galaxy/tools/remote_tool_eval.py +++ b/lib/galaxy/tools/remote_tool_eval.py @@ -59,7 +59,8 @@ def __init__( tool_data_table_manager: ToolDataTableManager, file_sources: ConfiguredFileSources, ): - self.model = Bunch(context=sa_session) + # For backward compatibility we need both context and session attributes that point to sa_session. + self.model = Bunch(context=sa_session, session=sa_session) self.config = tool_app_config self.datatypes_registry = datatypes_registry self.object_store = object_store