232402_test_to_dev #1637

Merged
carlossa merged 27 commits from 232402_test_to_dev into dev 2023-06-26 10:10:54 +00:00
2 changed files with 4 additions and 10 deletions
Showing only changes of commit 207dcacf0f - Show all commits

View File

@ -1,10 +1,10 @@
module.exports = function(Self) {
Self.observe('after save', async function(ctx) {
const instance = ctx.instance;
const instance = ctx.data || ctx.instance;
const models = Self.app.models;
const options = ctx.options;
if (!instance.sectorFk || !instance.labelerFk) return;
if (!instance?.sectorFk || !instance?.labelerFk) return;
const sector = await models.Sector.findById(instance.sectorFk, {
fields: ['mainPrinterFk']

View File

@ -16,18 +16,12 @@
"type": "number"
},
"trainFk": {
"type": "number",
"required": true
"type": "number"
},
"itemPackingTypeFk": {
"type": "string",
"required": true
"type": "string"
},
"warehouseFk": {
"type": "number",
"required": true
},
"sectorFk": {
"type": "number"
},
"labelerFk": {