{"action":"created","issue":{"url":"https://api.github.com/repos/GMOD/Apollo/issues/1550","repository_url":"https://api.github.com/repos/GMOD/Apollo","labels_url":"https://api.github.com/repos/GMOD/Apollo/issues/1550/labels{/name}","comments_url":"https://api.github.com/repos/GMOD/Apollo/issues/1550/comments","events_url":"https://api.github.com/repos/GMOD/Apollo/issues/1550/events","html_url":"https://github.com/GMOD/Apollo/issues/1550","id":222197146,"number":1550,"title":"error deleting user","user":{"login":"childers","id":421248,"avatar_url":"https://avatars0.githubusercontent.com/u/421248?v=3","gravatar_id":"","url":"https://api.github.com/users/childers","html_url":"https://github.com/childers","followers_url":"https://api.github.com/users/childers/followers","following_url":"https://api.github.com/users/childers/following{/other_user}","gists_url":"https://api.github.com/users/childers/gists{/gist_id}","starred_url":"https://api.github.com/users/childers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/childers/subscriptions","organizations_url":"https://api.github.com/users/childers/orgs","repos_url":"https://api.github.com/users/childers/repos","events_url":"https://api.github.com/users/childers/events{/privacy}","received_events_url":"https://api.github.com/users/childers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-17T18:40:53Z","updated_at":"2017-04-17T19:01:22Z","closed_at":null,"body":"I was trying to reset my user list and reload them all fresh and started getting errors on delete. I was able to loop through and rerun the user delete commands until I got to my last regular user, at which point I got a different type of error (see below).  \r\n\r\nThis is using a fork I updated from the main code base on Thursday.\r\n\r\n<img width=\"675\" alt=\"screen shot 2017-04-17 at 2 33 43 pm\" src=\"https://cloud.githubusercontent.com/assets/421248/25099635/264b32f2-237b-11e7-814a-fddd3ce96fb6.png\">\r\n\r\nIs this expected behavior? Also I got the same errors regardless of whether it was a web service call or a deletion through the Apollo2 admin interface.\r\n\r\nExample command that fails:\r\n```shell\r\n$ curl -i -X POST -H 'Content-Type: application/json' -d '{\"username\": \"Admin@server.net\", \"password\": \"SuperSecret\", \"userToDelete\": \"user@user.com\", \"client_token\": \"ignore\"}' https://<server>/apollo/user/deleteUser\r\nHTTP/1.1 200 OK\r\nServer: nginx/1.12.0\r\nDate: Mon, 17 Apr 2017 18:37:25 GMT\r\nContent-Type: application/json;charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nSet-Cookie: JSESSIONID=8928B2E749732DDA3FA6EB13D600F397; Path=/apollo/; HttpOnly\r\nSet-Cookie: rememberMe=deleteMe; Path=/apollo; Max-Age=0; Expires=Sun, 16-Apr-2017 18:37:25 GMT\r\nFront-End-Https: on\r\n\r\n{\"error\":\"Failed to delete the user Hibernate operation: could not execute statement; SQL [n/a]; ERROR: update or delete on table \\\"grails_user\\\" violates foreign key constraint \\\"fk_lflwbgxduee8ljjwe5rfbdil2\\\" on table \\\"feature_grails_user\\\"\\n  Detail: Key (id)=(1253590) is still referenced from table \\\"feature_grails_user\\\".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table \\\"grails_user\\\" violates foreign key constraint \\\"fk_lflwbgxduee8ljjwe5rfbdil2\\\" on table \\\"feature_grails_user\\\"\\n  Detail: Key (id)=(1253590) is still referenced from table \\\"feature_grails_user\\\".\"}\r\n\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GMOD/Apollo/issues/comments/294560710","html_url":"https://github.com/GMOD/Apollo/issues/1550#issuecomment-294560710","issue_url":"https://api.github.com/repos/GMOD/Apollo/issues/1550","id":294560710,"user":{"login":"nathandunn","id":751274,"avatar_url":"https://avatars1.githubusercontent.com/u/751274?v=3","gravatar_id":"","url":"https://api.github.com/users/nathandunn","html_url":"https://github.com/nathandunn","followers_url":"https://api.github.com/users/nathandunn/followers","following_url":"https://api.github.com/users/nathandunn/following{/other_user}","gists_url":"https://api.github.com/users/nathandunn/gists{/gist_id}","starred_url":"https://api.github.com/users/nathandunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathandunn/subscriptions","organizations_url":"https://api.github.com/users/nathandunn/orgs","repos_url":"https://api.github.com/users/nathandunn/repos","events_url":"https://api.github.com/users/nathandunn/events{/privacy}","received_events_url":"https://api.github.com/users/nathandunn/received_events","type":"User","site_admin":false},"created_at":"2017-04-17T19:01:22Z","updated_at":"2017-04-17T19:01:22Z","body":"Oh, for that purpose, I have some scripts ```scripts```.  E.g., \r\n\r\n   ./scripts/delete_all_features.sh\r\n\r\nYou can look through that.  If you want to add another script that also has users that would be fine, as well.  "}}
{"actor":{"display_login":"nathandunn"}}