refs #6915 test_master24_8 #2067
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
||||||
Self.saveCmr = async(ctx, tickets, options) => {
|
Self.saveCmr = async(ctx, tickets, options) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const myOptions = {userId: ctx.req.accessToken.userId};
|
const myOptions = {userId: ctx.req.accessToken.userId};
|
||||||
let tx;
|
let tx, dms;
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
@ -68,7 +68,8 @@ module.exports = Self => {
|
||||||
description: `Documento comprimido - CMR ${cmrFk}`,
|
description: `Documento comprimido - CMR ${cmrFk}`,
|
||||||
hasFile: false
|
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