From dfdb7a9b59e8c10a551e7003cebca50a50438846 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 27 Mar 2024 13:11:03 -0500 Subject: [PATCH] Fix bulk-delete rows for import/export batch per changes in SQLAlchemy 1.4 --- CHANGES.rst | 7 ++++++- tailbone/views/batch/importer.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4e96d2e1..1717910f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,13 +2,18 @@ CHANGELOG ========= +Unreleased +---------- + +* Fix bulk-delete rows for import/export batch. + + 0.9.88 (2024-03-26) ------------------- * Update some SQLAlchemy logic per upcoming 2.0 changes. - 0.9.87 (2023-12-26) ------------------- diff --git a/tailbone/views/batch/importer.py b/tailbone/views/batch/importer.py index a5916448..962093da 100644 --- a/tailbone/views/batch/importer.py +++ b/tailbone/views/batch/importer.py @@ -277,7 +277,7 @@ class ImporterBatchView(BatchMasterView): query = self.get_effective_row_data(sort=False) batch.rowcount -= query.count() delete_query = self.current_row_table.delete().where(self.current_row_table.c.uuid.in_([row.uuid for row in query])) - delete_query.execute() + self.Session.bind.execute(delete_query) return self.redirect(self.get_action_url('view', batch)) def get_row_xlsx_fields(self):