Link to reproduction
No response
Describe the Bug
I have a query in an order collection that changes my stock for inventory items using $inc
const inventory = payload.db.collections.inventory
await inventory.findByIdAndUpdate(
inventoryItem.id,
{
$inc: { stock: quantityDiff }
}, {
new: true
}
).exec();
The fields are updated correctly when looking at the edit form for that collection item, but the data is showing the previous value when looking at the list of collection items.
Is there some extra step I need to take to fully commit that change?
To Reproduce
Enable versions, then edit mongo data directly.
Payload Version
2
Adapters and Plugins
No response
Link to reproduction
No response
Describe the Bug
I have a query in an order collection that changes my stock for inventory items using $inc
The fields are updated correctly when looking at the edit form for that collection item, but the data is showing the previous value when looking at the list of collection items.
Is there some extra step I need to take to fully commit that change?
To Reproduce
Enable versions, then edit mongo data directly.
Payload Version
2
Adapters and Plugins
No response