{"action":"created","issue":{"url":"https://api.github.com/repos/MongoEngine/flask-mongoengine/issues/192","labels_url":"https://api.github.com/repos/MongoEngine/flask-mongoengine/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/MongoEngine/flask-mongoengine/issues/192/comments","events_url":"https://api.github.com/repos/MongoEngine/flask-mongoengine/issues/192/events","html_url":"https://github.com/MongoEngine/flask-mongoengine/issues/192","id":123463744,"number":192,"title":"operation_tracker _update and safe argument in pymongo WriteConcern","user":{"login":"dibrovsd","id":6123454,"avatar_url":"https://avatars.githubusercontent.com/u/6123454?v=3","gravatar_id":"","url":"https://api.github.com/users/dibrovsd","html_url":"https://github.com/dibrovsd","followers_url":"https://api.github.com/users/dibrovsd/followers","following_url":"https://api.github.com/users/dibrovsd/following{/other_user}","gists_url":"https://api.github.com/users/dibrovsd/gists{/gist_id}","starred_url":"https://api.github.com/users/dibrovsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibrovsd/subscriptions","organizations_url":"https://api.github.com/users/dibrovsd/orgs","repos_url":"https://api.github.com/users/dibrovsd/repos","events_url":"https://api.github.com/users/dibrovsd/events{/privacy}","received_events_url":"https://api.github.com/users/dibrovsd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-22T11:24:44Z","updated_at":"2016-01-09T21:27:09Z","closed_at":"2016-01-09T21:21:23Z","body":"Hi!\r\n\r\nError in flask-admin\r\nTypeError: __init__() got an unexpected keyword argument 'safe'\r\n\r\nin flask-mongoengine operation_tracker.py (line 79)\r\nWrap Cursor.update send safe=safe to pymongo update method\r\n\r\nin pymongo/collection.py (in Collection.update) \r\ncreate instance WriteConcern\r\nbut safe is deprecated kwarg in WriteConcern \r\n\r\ntrace is\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_debugtoolbar/__init__.py\", line 125, in dispatch_request\r\n    return view_func(**req.view_args)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_admin/base.py\", line 68, in inner\r\n    return self._run_view(f, *args, **kwargs)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_admin/base.py\", line 359, in _run_view\r\n    return fn(self, *args, **kwargs)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_admin/model/base.py\", line 1729, in edit_view\r\n    if self.update_model(form, model):\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_admin/contrib/mongoengine/view.py\", line 571, in update_model\r\n    if not self.handle_view_exception(ex):\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_admin/contrib/mongoengine/view.py\", line 569, in update_model\r\n    model.save()\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/mongoengine/document.py\", line 366, in save\r\n    upsert=upsert, **write_concern)\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/flask_mongoengine/operation_tracker.py\", line 91, in _update\r\n    **kwargs\r\n  File \"/Users/dibrovsd/.virtualenv/profits/lib/python3.5/site-packages/pymongo/collection.py\", line 2229, in update\r\n    write_concern = WriteConcern(**kwargs)\r\nTypeError: __init__() got an unexpected keyword argument 'safe'\r\n```"},"comment":{"url":"https://api.github.com/repos/MongoEngine/flask-mongoengine/issues/comments/170283612","html_url":"https://github.com/MongoEngine/flask-mongoengine/issues/192#issuecomment-170283612","issue_url":"https://api.github.com/repos/MongoEngine/flask-mongoengine/issues/192","id":170283612,"user":{"login":"dibrovsd","id":6123454,"avatar_url":"https://avatars.githubusercontent.com/u/6123454?v=3","gravatar_id":"","url":"https://api.github.com/users/dibrovsd","html_url":"https://github.com/dibrovsd","followers_url":"https://api.github.com/users/dibrovsd/followers","following_url":"https://api.github.com/users/dibrovsd/following{/other_user}","gists_url":"https://api.github.com/users/dibrovsd/gists{/gist_id}","starred_url":"https://api.github.com/users/dibrovsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibrovsd/subscriptions","organizations_url":"https://api.github.com/users/dibrovsd/orgs","repos_url":"https://api.github.com/users/dibrovsd/repos","events_url":"https://api.github.com/users/dibrovsd/events{/privacy}","received_events_url":"https://api.github.com/users/dibrovsd/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T21:27:09Z","updated_at":"2016-01-09T21:27:09Z","body":"Working. Thank you."}}