From b4d5d70e4cc9f68a89b132c3bcc1a8746820ff54 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 26 Mar 2022 15:29:28 -0500 Subject: [PATCH] Force session flush within try/catch, for batch refresh --- tailbone/views/batch/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index 7d6216d3..393bde08 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -1114,6 +1114,7 @@ class BatchMasterView(MasterView): cognizer = session.query(model.User).get(user_uuid) if user_uuid else None try: self.refresh_data(session, batch, cognizer, progress=progress) + session.flush() except Exception as error: session.rollback() log.warning("refreshing data for batch failed: {}".format(batch), exc_info=True)