Open lican09 opened 7 years ago
Could you share us with more details ? Like what is the scheme you are using and in what scenario you get this problem ??
class BaseInfo(Document):
name = StringField(unique=True)
class Demo(tornado.web.RequestHandler):
@gen.coroutine
def post(self):
data_dict = json.loads(self.request.body)
name = data_dict.get('name')
obj = BaseInfo()
obj.name = name
re = yield obj.save()
self.finish('saved Ok')
It works fine when I remove "unique=True". My MongoDB server version: 3.4.2, and motorengine version is up to date.
Is this still an issue? If so, could you please tell us which version of Python, Tornado and Motorengine you're using. Thank you!
when i debug my tornado view_method,it hang out at saving step. I just remove "unique=True", it works fine.