getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
214 stars 48 forks source link

Fix #411, change io.save to io.replace_one #433

Closed davidlatwe closed 4 years ago

davidlatwe commented 4 years ago

Pymongo collections.save() is deprecated since version 3.0. According to the document, we should change to use insert_one or replace_one.

411

mottosso commented 4 years ago

Thanks, I was also eyeing this one but wasn't sure what to replace it with. This looks good to me. 👍

davidlatwe commented 4 years ago

Oh, wait. I forgot the case that we create new document. Will patch this later.

davidlatwe commented 4 years ago

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

davidlatwe commented 4 years ago

Will merge this tomorrow if no objections :)