This commit is contained in:
parent
083f19fd41
commit
ca28d2d78f
|
@ -40,7 +40,7 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
fields: ['id'],
|
fields: ['id'],
|
||||||
where: {code: expedition.stateCode}
|
where: {code: expedition.stateCode}
|
||||||
}
|
}, myOptions
|
||||||
);
|
);
|
||||||
if (!expeditionStateType)
|
if (!expeditionStateType)
|
||||||
throw new UserError(`Invalid state code: ${expedition.stateCode}.`);
|
throw new UserError(`Invalid state code: ${expedition.stateCode}.`);
|
||||||
|
@ -51,7 +51,7 @@ module.exports = Self => {
|
||||||
await models.ExpeditionState.create({
|
await models.ExpeditionState.create({
|
||||||
expeditionFk: expedition.expeditionFk,
|
expeditionFk: expedition.expeditionFk,
|
||||||
typeFk,
|
typeFk,
|
||||||
});
|
}, myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
Loading…
Reference in New Issue