This commit is contained in:
parent
3e522b08b6
commit
d9339af87e
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue