{"action":"created","issue":{"url":"https://api.github.com/repos/codeforamerica/mdc-feedback/issues/451","labels_url":"https://api.github.com/repos/codeforamerica/mdc-feedback/issues/451/labels{/name}","comments_url":"https://api.github.com/repos/codeforamerica/mdc-feedback/issues/451/comments","events_url":"https://api.github.com/repos/codeforamerica/mdc-feedback/issues/451/events","html_url":"https://github.com/codeforamerica/mdc-feedback/issues/451","id":113686086,"number":451,"title":"Delete user goes to \"internal server error","user":{"login":"mathias-gibson","id":8147336,"avatar_url":"https://avatars.githubusercontent.com/u/8147336?v=3","gravatar_id":"","url":"https://api.github.com/users/mathias-gibson","html_url":"https://github.com/mathias-gibson","followers_url":"https://api.github.com/users/mathias-gibson/followers","following_url":"https://api.github.com/users/mathias-gibson/following{/other_user}","gists_url":"https://api.github.com/users/mathias-gibson/gists{/gist_id}","starred_url":"https://api.github.com/users/mathias-gibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathias-gibson/subscriptions","organizations_url":"https://api.github.com/users/mathias-gibson/orgs","repos_url":"https://api.github.com/users/mathias-gibson/repos","events_url":"https://api.github.com/users/mathias-gibson/events{/privacy}","received_events_url":"https://api.github.com/users/mathias-gibson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"phiden","id":4895604,"avatar_url":"https://avatars.githubusercontent.com/u/4895604?v=3","gravatar_id":"","url":"https://api.github.com/users/phiden","html_url":"https://github.com/phiden","followers_url":"https://api.github.com/users/phiden/followers","following_url":"https://api.github.com/users/phiden/following{/other_user}","gists_url":"https://api.github.com/users/phiden/gists{/gist_id}","starred_url":"https://api.github.com/users/phiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phiden/subscriptions","organizations_url":"https://api.github.com/users/phiden/orgs","repos_url":"https://api.github.com/users/phiden/repos","events_url":"https://api.github.com/users/phiden/events{/privacy}","received_events_url":"https://api.github.com/users/phiden/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-10-27T20:50:44Z","updated_at":"2015-10-30T12:44:05Z","closed_at":null,"body":"Could lead to users getting accidentally deleted. the edit button should be bigger or contained within the edit user page. Delete user also goes to \"internal server error\"\r\n\r\n![screenshot 2015-10-27 16 47 58](https://cloud.githubusercontent.com/assets/8147336/10772081/952bfea8-7cca-11e5-99c3-856d3c5c4005.png)\r\n"},"comment":{"url":"https://api.github.com/repos/codeforamerica/mdc-feedback/issues/comments/152513619","html_url":"https://github.com/codeforamerica/mdc-feedback/issues/451#issuecomment-152513619","issue_url":"https://api.github.com/repos/codeforamerica/mdc-feedback/issues/451","id":152513619,"user":{"login":"phiden","id":4895604,"avatar_url":"https://avatars.githubusercontent.com/u/4895604?v=3","gravatar_id":"","url":"https://api.github.com/users/phiden","html_url":"https://github.com/phiden","followers_url":"https://api.github.com/users/phiden/followers","following_url":"https://api.github.com/users/phiden/following{/other_user}","gists_url":"https://api.github.com/users/phiden/gists{/gist_id}","starred_url":"https://api.github.com/users/phiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phiden/subscriptions","organizations_url":"https://api.github.com/users/phiden/orgs","repos_url":"https://api.github.com/users/phiden/repos","events_url":"https://api.github.com/users/phiden/events{/privacy}","received_events_url":"https://api.github.com/users/phiden/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T12:44:05Z","updated_at":"2015-10-30T12:44:05Z","body":"Still seeing the error, though. \r\n\r\n```\r\nsqlalchemy.exc.DataError\r\nDataError: (psycopg2.DataError) invalid input syntax for integer: \"sarasti@miamidade.gov\"\r\nLINE 3: WHERE users.id = 'sarasti@miamidade.gov'\r\n                         ^\r\n [SQL: 'SELECT users.id AS users_id, users.email AS users_email, users.created_at AS users_created_at, users.full_name AS users_full_name, users.active AS users_active, users.role_id AS users_role_id \\nFROM users \\nWHERE users.id = %(id_1)s'] [parameters: {'id_1': u'sarasti@miamidade.gov'}]\r\n\r\nTraceback (most recent call last)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1836, in __call__\r\nreturn self.wsgi_app(environ, start_response)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1820, in wsgi_app\r\nresponse = self.make_response(self.handle_exception(e))\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1403, in handle_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1817, in wsgi_app\r\nresponse = self.full_dispatch_request()\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\nrv = self.handle_user_exception(e)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\nrv = self.dispatch_request()\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py\", line 125, in dispatch_request\r\nreturn view_func(**req.view_args)\r\nFile \"/Users/sophiadengo/Desktop/mdc-feedback/feedback/decorators.py\", line 23, in decorated_function\r\nreturn view_function(*args, **kwargs)\r\nFile \"/Users/sophiadengo/Desktop/mdc-feedback/feedback/user/views.py\", line 104, in user_delete\r\nuser = get_object_or_404(User, User.id == id)\r\nFile \"/Users/sophiadengo/Desktop/mdc-feedback/feedback/database.py\", line 19, in get_object_or_404\r\nreturn model.query.filter(*criterion).one()\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2472, in one\r\nret = list(self)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2515, in __iter__\r\nreturn self._execute_and_instances(context)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2530, in _execute_and_instances\r\nresult = conn.execute(querycontext.statement, self._params)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 914, in execute\r\nreturn meth(self, multiparams, params)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/sql/elements.py\", line 323, in _execute_on_connection\r\nreturn connection._execute_clauseelement(self, multiparams, params)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1010, in _execute_clauseelement\r\ncompiled_sql, distilled_params\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1146, in _execute_context\r\ncontext)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1339, in _handle_dbapi_exception\r\nexc_info\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/util/compat.py\", line 199, in raise_from_cause\r\nreraise(type(exception), exception, tb=exc_tb)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1139, in _execute_context\r\ncontext)\r\nFile \"/Users/sophiadengo/.virtualenvs/mdc-feedback-env/lib/python2.7/site-packages/sqlalchemy/engine/default.py\", line 442, in do_execute\r\ncursor.execute(statement, parameters)\r\nDataError: (psycopg2.DataError) invalid input syntax for integer: \"sarasti@miamidade.gov\" LINE 3: WHERE users.id = 'sarasti@miamidade.gov' ^ [SQL: 'SELECT users.id AS users_id, users.email AS users_email, users.created_at AS users_created_at, users.full_name AS users_full_name, users.active AS users_active, users.role_id AS users_role_id \\nFROM users \\nWHERE users.id = %(id_1)s'] [parameters: {'id_1': u'sarasti@miamidade.gov'}]\r\n\r\n```"}}