From d1d8b08a20b9d3fe80b8998a35d6a4d97900d3b5 Mon Sep 17 00:00:00 2001 From: John Davis Date: Sat, 13 Jan 2024 16:17:42 -0500 Subject: [PATCH] Add one more check for invalidated transaction --- lib/galaxy/managers/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/managers/base.py b/lib/galaxy/managers/base.py index f3abe35e7ce..15503678cb9 100644 --- a/lib/galaxy/managers/base.py +++ b/lib/galaxy/managers/base.py @@ -54,7 +54,10 @@ from galaxy import ( model, ) from galaxy.model import tool_shed_install -from galaxy.model.base import transaction +from galaxy.model.base import ( + check_database_connection, + transaction, +) from galaxy.schema import ValueFilterQueryParams from galaxy.schema.fields import DecodedDatabaseIdField from galaxy.schema.storage_cleaner import ( @@ -315,6 +318,7 @@ class ModelManager(Generic[U]): :raises exceptions.ObjectNotFound: if no model is found :raises exceptions.InconsistentDatabase: if more than one model is found """ + check_database_connection(self.session()) # overridden to raise serializable errors try: return query.one()