Fix bug when populating new batch
This commit is contained in:
parent
88a8922833
commit
edbf7e6723
|
@ -926,8 +926,9 @@ class BatchMasterView(MasterView):
|
||||||
# mustn't use tailbone web session here
|
# mustn't use tailbone web session here
|
||||||
session = RattailSession()
|
session = RattailSession()
|
||||||
batch = session.query(self.model_class).get(batch_uuid)
|
batch = session.query(self.model_class).get(batch_uuid)
|
||||||
|
user = session.query(model.User).get(user_uuid)
|
||||||
try:
|
try:
|
||||||
self.handler.do_populate(batch, progress=progress)
|
self.handler.do_populate(batch, user, progress=progress)
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
session.rollback()
|
session.rollback()
|
||||||
log.warning("batch population failed: %s", batch, exc_info=True)
|
log.warning("batch population failed: %s", batch, exc_info=True)
|
||||||
|
|
Loading…
Reference in a new issue