Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in range(0,len(user_list)):
- collection_4.update_one({'user_id':ObjectId(user_list[i])},{'$set':{'products': temp_list }},upsert=True)
- This is giving me error, TypeError: list indices must be integers or slices, not ObjectId
- collection_4.update_one({'user_id':ObjectId("5c471d607f")},{'$set':{'products': temp_list }},upsert=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement