Flush early when populating batch, to ensure error is shown

This commit is contained in:
Lance Edgar 2022-04-13 16:42:47 -05:00
parent aea7f01047
commit 10a801aa10

View file

@ -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)