diff --git a/modules/ticket/back/models/expedition-state.js b/modules/ticket/back/models/expedition-state.js index 18bab580e..f819dc05c 100644 --- a/modules/ticket/back/models/expedition-state.js +++ b/modules/ticket/back/models/expedition-state.js @@ -49,7 +49,7 @@ module.exports = function(Self) { }, myOptions); - const salesPersonFk = dataExpedition.toJSON().ticket?.client?.salesPersonFk; + const salesPersonFk = dataExpedition.ticket()?.client()?.salesPersonFk; if (salesPersonFk) { const url = await Self.app.models.Url.getUrl(); diff --git a/modules/ticket/back/models/expedition-state.json b/modules/ticket/back/models/expedition-state.json index 159a9275e..522327031 100644 --- a/modules/ticket/back/models/expedition-state.json +++ b/modules/ticket/back/models/expedition-state.json @@ -19,7 +19,8 @@ "type": "number" }, "typeFk": { - "type": "number" + "type": "number", + "required": true }, "userFk": { "type": "number"