fix: #6184 Minor changes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-01-29 08:25:00 +01:00
parent 990e8ee249
commit 65756f98ad
1 changed files with 6 additions and 4 deletions

View File

@ -33,6 +33,11 @@ module.exports = Self => {
}
try {
const dmsTypeCmr = await models.DmsType.findOne({
where: {code: 'cmr'},
fields: ['id']
}, myOptions);
for (const ticketId of tickets) {
const ticket = await models.Ticket.findById(ticketId, myOptions);
@ -43,10 +48,7 @@ module.exports = Self => {
relation: 'dms',
fields: ['dmsFk'],
scope: {
relation: 'dmsType',
scope: {
where: {code: 'cmr'}
}
where: {dmsTypeFk: dmsTypeCmr.id}
}
}
}, myOptions);