pymongo

9 views
Skip to first unread message

B.navya spoorthi Sweety

unread,
Feb 11, 2019, 6:14:55 AM2/11/19
to django...@googlegroups.com
hi all,
i am trying to update all documents in collection using pymongo
here is my update function,

def update():
      for doc in mycol.find():
             mycol.update({},{"$set":{"status":"approved"}})

but using above code i am able to update only one document,what i am doing wrong here

thanks in advance
Reply all
Reply to author
Forward
0 new messages