added transaction options to findOne()
gitea/salix/master This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-10-10 08:33:22 +02:00
parent 6422d25ad6
commit d2329d989f
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ module.exports = Self => {
const models = Self.app.models; const models = Self.app.models;
const storageConnector = Self.app.dataSources.storage.connector; const storageConnector = Self.app.dataSources.storage.connector;
const myUserId = ctx.req.accessToken.userId; const myUserId = ctx.req.accessToken.userId;
const myWorker = await models.Worker.findOne({where: {userFk: myUserId}}); const myWorker = await models.Worker.findOne({where: {userFk: myUserId}}, myOptions);
const args = ctx.args; const args = ctx.args;
const newDms = await Self.create({ const newDms = await Self.create({