find_one_and_update python mongoutils code example
Example: mongoid find_one_and_update
Model.where(id: id).find_one_and_update({
:$inc => {
payload
}
},
upsert: true,
return_document: :after
)
Model.where(id: id).find_one_and_update({
:$inc => {
payload
}
},
upsert: true,
return_document: :after
)