Pymongo bug: UpdateResult.did_upsert throws

I created a ticket to track this here: https://jira.mongodb.org/browse/PYTHON-4786

did_upsert was added accidentally and was never intended to be included in the 4.9 release. Instead, to check for an upsert an app can use this existing api:

did_upsert = update_result.upserted_id is not None
1 Like