This is an old question, but I stumbled onto this when looking for the answer so I wanted to give the update to the answer for reference.
The methods save
and update
are deprecated.
save(to_save, manipulate=True, check_keys=True, **kwargs)ΒΆ Save a document in this collection.
DEPRECATED - Use insert_one() or replace_one() instead.
Changed in version 3.0: Removed the safe parameter. Pass w=0 for unacknowledged write operations.
update(spec, document, upsert=False, manipulate=False, multi=False, check_keys=True, **kwargs) Update a document(s) in this collection.
DEPRECATED - Use replace_one(), update_one(), or update_many() instead.
Changed in version 3.0: Removed the safe parameter. Pass w=0 for unacknowledged write operations.
in the OPs particular case, it's better to use replace_one
.