4492-item.create-same-as-item.isLaid #1125
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1125
Loading…
Reference in New Issue
No description provided.
Delete Branch "4492-item.create-same-as-item.isLaid"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -51,6 +51,12 @@ module.exports = Self => {
const item = await models.Item.create(params, myOptions);
const itemType = await models.ItemType.findById(item.typeFk, myOptions);
Mover esta linea arriba del create para poder crearlo directamente con el valor de la propiedad isLaid
@ -54,0 +55,4 @@
item.isLaid = itemType.isLaid;
await item.save(myOptions);
Evitar el save para no hacer dos consultas a la bd
@ -28,1 +28,4 @@
"type": "number"
},
"isLaid": {
"type": "number"
boolean