diff --git a/lib/galaxy/model/store/__init__.py b/lib/galaxy/model/store/__init__.py index 8be4bbe25c6a..b70b6740bba8 100644 --- a/lib/galaxy/model/store/__init__.py +++ b/lib/galaxy/model/store/__init__.py @@ -218,6 +218,9 @@ def filter_by(*args, **kwargs): return Bunch(find=find, get=find, filter_by=filter_by) + def get(self, model_class: Type, primary_key: Any): # patch for SQLAlchemy 2.0 compatibility + return self.query(model_class).get(primary_key) + def replace_metadata_file( metadata: Dict[str, Any],