mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Add one more check for invalidated transaction
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user