added requested changes, refs #4492 @40m
This commit is contained in:
parent
37292cee89
commit
638fd62aae
|
@ -49,14 +49,12 @@ module.exports = Self => {
|
|||
const provisionalName = params.provisionalName;
|
||||
delete params.provisionalName;
|
||||
|
||||
const itemType = await models.ItemType.findById(params.typeFk, myOptions);
|
||||
|
||||
params.isLaid = itemType.isLaid;
|
||||
|
||||
const item = await models.Item.create(params, myOptions);
|
||||
|
||||
const itemType = await models.ItemType.findById(item.typeFk, myOptions);
|
||||
|
||||
item.isLaid = itemType.isLaid;
|
||||
|
||||
await item.save(myOptions);
|
||||
|
||||
const typeTags = await models.ItemTypeTag.find({
|
||||
where: {itemTypeFk: item.typeFk}
|
||||
}, myOptions);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"type": "number"
|
||||
},
|
||||
"isLaid": {
|
||||
"type": "number"
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
|
Loading…
Reference in New Issue