fixed transactions

This commit is contained in:
Gerard 2018-10-22 14:35:46 +02:00
parent c512192052
commit a010871a7d
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ module.exports = function(Self) {
countryFk: data.countryFk,
isEqualizated: data.isEqualizated
};
newClient = await Self.create(client);
newClient = await Self.create(client, {transaction});
await transaction.commit();
return newClient;
} catch (e) {

View File

@ -63,7 +63,7 @@ module.exports = Self => {
await model.Sale.updateAll(
{id: {inq: selectedSalesId}},
{ticketFk: newTicket.id},
{transaction: transaction});
{transaction});
await transaction.commit();