What parameter needs to pass for the MongoEngine update_one() to get the updated document in return? Currently, it is returning 0 or 1.
Asked
Active
Viewed 87 times
0
-
Instead of using update_one() I used the method modify(). Pass the parameter new = True to it to get the updated result. – chetan tamboli Dec 06 '18 at 15:52
2 Answers
1
Instead of using update_one() I used the method modify(). Pass the parameter new = True to it to get the updated result

chetan tamboli
- 161
- 2
- 13
0
According to the mongoengine documentation there doesn't seem to be anything you can pass to update_one
to return the updated document. I've tried this myself in a test environment and I'm also getting either a 0 or 1 returned.
There is a parameter you can pass to update
called full_result
which gives you a bit more information but it's nothing that would help you in this case.

A Random Guy
- 167
- 6