This commit is contained in:
parent
d1df8009a6
commit
9f6d034f9c
|
@ -86,9 +86,9 @@ module.exports = Self => {
|
||||||
|
|
||||||
await userToUpdate.save(myOptions);
|
await userToUpdate.save(myOptions);
|
||||||
await models.Account.sync(userToUpdate.name, null, null, myOptions);
|
await models.Account.sync(userToUpdate.name, null, null, myOptions);
|
||||||
await tx.commit();
|
if (tx) await tx.commit();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await tx.rollback();
|
if (tx) await tx.rollback();
|
||||||
throw err;
|
throw err;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue