You must do what is done with the help of $setOnInsert in pymongo class User(Document): test = IntField() User(test=5).update(test=6,tost=7,upsert=True) ...
確定! 回上一頁