Answer the question
In order to leave comments, you need to log in
Why does it return immutable records?
import pymongo
conn = pymongo.MongoClient("localhost", 27017)
db = conn["crypto_signals"]
signals_db = db["signals"]
signals_db.update({}, {"$set": {"priority": 0}}, )
signals = signals_db.find({"priority":{"$exists":False}})
for signal in signals:
print(signal)
Answer the question
In order to leave comments, you need to log in
update should be replaced with update_many
And everything will work
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question