Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. for i in range(0,len(user_list)):
  2. collection_4.update_one({'user_id':ObjectId(user_list[i])},{'$set':{'products': temp_list }},upsert=True)
  3.  
  4. This is giving me error, TypeError: list indices must be integers or slices, not ObjectId
  5.  
  6. collection_4.update_one({'user_id':ObjectId("5c471d607f")},{'$set':{'products': temp_list }},upsert=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement