From bcc01b8080c419803a72cdb4f44ef642151416da Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 22 Jan 2024 14:34:08 -0500 Subject: [PATCH] Fixes the unit tests but is wrong? --- lib/galaxy/quota/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/quota/__init__.py b/lib/galaxy/quota/__init__.py index 728ed1cb93db..f3c98afe9048 100644 --- a/lib/galaxy/quota/__init__.py +++ b/lib/galaxy/quota/__init__.py @@ -271,9 +271,9 @@ def relabel_quota_for_dataset(self, dataset, from_label: Optional[str], to_label bind = {"dataset_id": dataset.id, "adjust": int(adjust), "to_label": to_label, "from_label": from_label} engine = self.sa_session.get_bind() with engine.connect() as conn: - conn.execute(text(from_statement), bind) - conn.execute(text(to_statement), bind) - return None + with conn.begin(): + conn.execute(text(from_statement), bind) + conn.execute(text(to_statement), bind) def _default_unregistered_quota(self, quota_source_label): return self._default_quota(self.model.DefaultQuotaAssociation.types.UNREGISTERED, quota_source_label)