From 724e7954a5f14b8450db0d0f3dd7a07ea57d9305 Mon Sep 17 00:00:00 2001 From: John Davis Date: Mon, 29 Apr 2024 14:18:16 -0400 Subject: [PATCH] Check db connection to issue a rollback if no connection --- lib/galaxy/tool_shed/util/repository_util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_shed/util/repository_util.py b/lib/galaxy/tool_shed/util/repository_util.py index 11e9a675039d..50b832d7a5da 100644 --- a/lib/galaxy/tool_shed/util/repository_util.py +++ b/lib/galaxy/tool_shed/util/repository_util.py @@ -22,7 +22,10 @@ from sqlalchemy.orm import joinedload from galaxy import util -from galaxy.model.base import transaction +from galaxy.model.base import ( + check_database_connection, + transaction, +) from galaxy.model.scoped_session import install_model_scoped_session from galaxy.model.tool_shed_install import ToolShedRepository from galaxy.tool_shed.util import basic_util @@ -283,6 +286,7 @@ def get_installed_repository( Return a tool shed repository database record defined by the combination of a toolshed, repository name, repository owner and either current or originally installed changeset_revision. """ + check_database_connection(app.install_model.context) # We store the port, if one exists, in the database. tool_shed = common_util.remove_protocol_from_tool_shed_url(tool_shed) if from_cache: