{"action":"created","issue":{"url":"https://api.github.com/repos/mattupstate/flask-security/issues/667","repository_url":"https://api.github.com/repos/mattupstate/flask-security","labels_url":"https://api.github.com/repos/mattupstate/flask-security/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/mattupstate/flask-security/issues/667/comments","events_url":"https://api.github.com/repos/mattupstate/flask-security/issues/667/events","html_url":"https://github.com/mattupstate/flask-security/issues/667","id":238946307,"number":667,"title":"Flask Mongo Engine Creating User","user":{"login":"drcrook1","id":6099287,"avatar_url":"https://avatars3.githubusercontent.com/u/6099287?v=3","gravatar_id":"","url":"https://api.github.com/users/drcrook1","html_url":"https://github.com/drcrook1","followers_url":"https://api.github.com/users/drcrook1/followers","following_url":"https://api.github.com/users/drcrook1/following{/other_user}","gists_url":"https://api.github.com/users/drcrook1/gists{/gist_id}","starred_url":"https://api.github.com/users/drcrook1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcrook1/subscriptions","organizations_url":"https://api.github.com/users/drcrook1/orgs","repos_url":"https://api.github.com/users/drcrook1/repos","events_url":"https://api.github.com/users/drcrook1/events{/privacy}","received_events_url":"https://api.github.com/users/drcrook1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-27T18:47:13Z","updated_at":"2017-06-29T08:28:38Z","closed_at":null,"body":"The backend is Azure's Cosmos DB using the Mongo API.  Not 100% sure if this is a Cosmos DB issue or a Flask Security Issue.\r\n\r\nFlask-Security version==1.7.5\r\n\r\nERROR:\r\nmongoengine.errors.FieldDoesNotExist\r\nmongoengine.errors.FieldDoesNotExist: The fields \"{'_t', 'errmsg', '$err', 'ok', 'code'}\" do not exist on the document \"User\"\r\n\r\nTraceback (most recent call last)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1997, in __call__\r\nreturn self.wsgi_app(environ, start_response)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1985, in wsgi_app\r\nresponse = self.handle_exception(e)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1540, in handle_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/_compat.py\", line 33, in reraise\r\nraise value\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1982, in wsgi_app\r\nresponse = self.full_dispatch_request()\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1614, in full_dispatch_request\r\nrv = self.handle_user_exception(e)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1517, in handle_user_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/_compat.py\", line 33, in reraise\r\nraise value\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1612, in full_dispatch_request\r\nrv = self.dispatch_request()\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask/app.py\", line 1598, in dispatch_request\r\nreturn self.view_functions[rule.endpoint](**req.view_args)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask_security/decorators.py\", line 225, in wrapper\r\nreturn f(*args, **kwargs)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask_security/views.py\", line 75, in login\r\nif form.validate_on_submit():\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask_wtf/form.py\", line 101, in validate_on_submit\r\nreturn self.is_submitted() and self.validate()\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask_security/forms.py\", line 230, in validate\r\nself.user = _datastore.get_user(self.email.data)\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask_security/datastore.py\", line 226, in get_user\r\nrv = self.user_model.objects(**query).first()\r\nFile \"/usr/local/lib/python3.5/dist-packages/mongoengine/queryset/base.py\", line 300, in first\r\nresult = queryset[0]\r\nFile \"/usr/local/lib/python3.5/dist-packages/mongoengine/queryset/base.py\", line 200, in __getitem__\r\nonly_fields=self.only_fields\r\nFile \"/usr/local/lib/python3.5/dist-packages/mongoengine/base/document.py\", line 730, in _from_son\r\nobj = cls(__auto_convert=False, _created=created, __only_fields=only_fields, **data)\r\nFile \"/usr/local/lib/python3.5/dist-packages/mongoengine/base/document.py\", line 78, in __init__\r\nraise FieldDoesNotExist(msg)\r\nmongoengine.errors.FieldDoesNotExist: The fields \"{'_t', 'errmsg', '$err', 'ok', 'code'}\" do not exist on the document \"User\""},"comment":{"url":"https://api.github.com/repos/mattupstate/flask-security/issues/comments/311898574","html_url":"https://github.com/mattupstate/flask-security/issues/667#issuecomment-311898574","issue_url":"https://api.github.com/repos/mattupstate/flask-security/issues/667","id":311898574,"user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars2.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T08:28:38Z","updated_at":"2017-06-29T08:28:38Z","body":"Can you check if you get the same error with `Flask-Security==3.0.0`?\r\n\r\nOut of curiosity can you tell me what is in variable `query` in:\r\n```\r\nFile \"/usr/local/lib/python3.5/dist-packages/flask_security/datastore.py\", line 226, in get_user\r\nrv = self.user_model.objects(**query).first()\r\n```"}}
{"actor":{"display_login":"jirikuncar"}}