【发布时间】:2013-11-15 13:51:52
【问题描述】:
我尝试在一个查询中使用 2 个操作来更改文档:
_userstats.update(
{"nick" : nick},
{"$set" : {"online" : True}},
{"$inc" : {"joined" : 1}})
但是当我尝试这个时,我得到了错误:
raise TypeError("upsert must be an instance of bool")
TypeError: upsert must be an instance of bool
我没有得到这个工作。 谁能帮我弄清楚我到底错在哪里?
【问题讨论】:
-
您可以在这里找到答案:stackoverflow.com/questions/5055797/…