Closed davidlatwe closed 4 years ago
Thanks, I was also eyeing this one but wasn't sure what to replace it with. This looks good to me. 👍
Oh, wait. I forgot the case that we create new document. Will patch this later.
Ah, no. We are safe to merge this :)
The time we call replace_one
, documents were already exists in those cases.
And I just tested it :P
Will merge this tomorrow if no objections :)
Pymongo
collections.save()
is deprecated since version 3.0. According to the document, we should change to useinsert_one
orreplace_one
.replace_one
since we useio.save
to overwrite full document.io.save
doc string.411