refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit d9339af87e - Show all commits

View File

@ -22,7 +22,7 @@ module.exports = Self => {
Self.saveCmr = async(ctx, tickets, options) => {
const models = Self.app.models;
const myOptions = {userId: ctx.req.accessToken.userId};
let tx;
let tx, dms;
if (typeof options == 'object')
Object.assign(myOptions, options);
@ -68,7 +68,8 @@ module.exports = Self => {
description: `Documento comprimido - CMR ${cmrFk}`,
hasFile: false
};
await models.Dms.uploadFile(ctxUploadFile, myOptions);
dms = await models.Dms.uploadFile(ctxUploadFile, myOptions);
await models.TicketDms.create({ticketFk: ticketId, dmsFk: dms[0].id}, myOptions);
}
}
}