Fix bulk-delete rows for import/export batch

per changes in SQLAlchemy 1.4
This commit is contained in:
Lance Edgar 2024-03-27 13:11:03 -05:00
parent 4363b7c5d7
commit dfdb7a9b59
2 changed files with 7 additions and 2 deletions

View file

@ -2,13 +2,18 @@
CHANGELOG CHANGELOG
========= =========
Unreleased
----------
* Fix bulk-delete rows for import/export batch.
0.9.88 (2024-03-26) 0.9.88 (2024-03-26)
------------------- -------------------
* Update some SQLAlchemy logic per upcoming 2.0 changes. * Update some SQLAlchemy logic per upcoming 2.0 changes.
0.9.87 (2023-12-26) 0.9.87 (2023-12-26)
------------------- -------------------

View file

@ -277,7 +277,7 @@ class ImporterBatchView(BatchMasterView):
query = self.get_effective_row_data(sort=False) query = self.get_effective_row_data(sort=False)
batch.rowcount -= query.count() 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 = 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)) return self.redirect(self.get_action_url('view', batch))
def get_row_xlsx_fields(self): def get_row_xlsx_fields(self):