From d2329d989f21bf084b62f512c4cd4d654798cf16 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 10 Oct 2019 08:33:22 +0200 Subject: [PATCH] added transaction options to findOne() --- back/methods/dms/uploadFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/dms/uploadFile.js b/back/methods/dms/uploadFile.js index b50aaf824..41d551f2b 100644 --- a/back/methods/dms/uploadFile.js +++ b/back/methods/dms/uploadFile.js @@ -94,7 +94,7 @@ module.exports = Self => { const models = Self.app.models; const storageConnector = Self.app.dataSources.storage.connector; 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 newDms = await Self.create({