Fix bug when populating new batch

This commit is contained in:
Lance Edgar 2018-06-27 12:19:34 -05:00
parent 88a8922833
commit edbf7e6723

View file

@ -926,8 +926,9 @@ class BatchMasterView(MasterView):
# mustn't use tailbone web session here
session = RattailSession()
batch = session.query(self.model_class).get(batch_uuid)
user = session.query(model.User).get(user_uuid)
try:
self.handler.do_populate(batch, progress=progress)
self.handler.do_populate(batch, user, progress=progress)
except Exception as error:
session.rollback()
log.warning("batch population failed: %s", batch, exc_info=True)