refs #6184 Added cmrFk in ticket model
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2023-10-11 12:20:30 +02:00
parent d9339af87e
commit c0089b1fa0
2 changed files with 8 additions and 7 deletions

View File

@ -1,8 +1,6 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('saveCmr', {
description: 'Save sign',
description: 'Save cmr',
accessType: 'WRITE',
accepts:
[
@ -34,8 +32,8 @@ module.exports = Self => {
try {
for (const ticketId of tickets) {
const cmrFk = await models.Ticket.findOne(
{where: {id: ticketId},
const cmrFk = await models.Ticket.findOne({
where: {id: ticketId},
fields: ['cmrFk']
}, myOptions);

View File

@ -63,6 +63,9 @@
},
"weight": {
"type": "number"
},
"cmrFk": {
"type": "number"
}
},
"relations": {