3
0
Fork 0

fix: flush session when removing batch row

otherwise if caller doesn't flush, could become confused.  e.g. for
some reason `batch.row_count` did not appear updated until flush
This commit is contained in:
Lance Edgar 2025-01-09 12:10:52 -06:00
parent 0bb0a51f32
commit 6a08c50452

View file

@ -309,6 +309,7 @@ class BatchHandler(GenericHandler):
should (usually) override :meth:`remove_row()` etc.
"""
batch = row.batch
session = self.app.get_session(batch)
self.remove_row(row)
@ -316,6 +317,7 @@ class BatchHandler(GenericHandler):
batch.row_count -= 1
self.refresh_batch_status(batch)
session.flush()
def remove_row(self, row):
"""