I want to update two documents by _id using the update_many function. Is it possible to do this? If so, how should I implement it?
I tried to use AI to implement this, but it didn't work. Here is the code I managed to write:
database.update_many(
filter={"_id": {"$inc": ["Shares", "Crypto"]}},
update=[
UpdateMany({"$set": share_data}),
UpdateMany({"$set": crypto_data})
],
upsert=True
)