From 10a801aa103cfb656997e17554994d07a3bbb17d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 13 Apr 2022 16:42:47 -0500 Subject: [PATCH] Flush early when populating batch, to ensure error is shown --- 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 393bde08..84b2e77c 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -1057,6 +1057,7 @@ class BatchMasterView(MasterView): user = session.query(model.User).get(user_uuid) try: self.handler.do_populate(batch, user, progress=progress) + session.flush() except Exception as error: session.rollback() log.exception("batch population failed: %s", batch)