{"action":"created","issue":{"url":"https://api.github.com/repos/eResearchSA/reporting-unified/issues/21","repository_url":"https://api.github.com/repos/eResearchSA/reporting-unified","labels_url":"https://api.github.com/repos/eResearchSA/reporting-unified/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/eResearchSA/reporting-unified/issues/21/comments","events_url":"https://api.github.com/repos/eResearchSA/reporting-unified/issues/21/events","html_url":"https://github.com/eResearchSA/reporting-unified/issues/21","id":147947098,"number":21,"title":"When a file is being ingested second time, 500 error emitted","user":{"login":"Li-ReDBox","id":3203171,"avatar_url":"https://avatars.githubusercontent.com/u/3203171?v=3","gravatar_id":"","url":"https://api.github.com/users/Li-ReDBox","html_url":"https://github.com/Li-ReDBox","followers_url":"https://api.github.com/users/Li-ReDBox/followers","following_url":"https://api.github.com/users/Li-ReDBox/following{/other_user}","gists_url":"https://api.github.com/users/Li-ReDBox/gists{/gist_id}","starred_url":"https://api.github.com/users/Li-ReDBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Li-ReDBox/subscriptions","organizations_url":"https://api.github.com/users/Li-ReDBox/orgs","repos_url":"https://api.github.com/users/Li-ReDBox/repos","events_url":"https://api.github.com/users/Li-ReDBox/events{/privacy}","received_events_url":"https://api.github.com/users/Li-ReDBox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-13T05:05:50Z","updated_at":"2016-04-13T05:45:49Z","closed_at":null,"body":"sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) duplicate key value violates unique constraint \"input_name_key\"\r\nDETAIL:  Key (name)=(20160113-112448/4/000000046168-000000046209.json.xz) already exists.\r\n [SQL: 'INSERT INTO input (name) VALUES (%(name)s) RETURNING input.id'] [parameters: {'name': '20160113-112448/4/000000046168-000000046209.json.xz'}]\r\n\r\nWe provide an error handling for it like those used in other places with get_or_create. Also need to think if we allow update from the same file."},"comment":{"url":"https://api.github.com/repos/eResearchSA/reporting-unified/issues/comments/209238666","html_url":"https://github.com/eResearchSA/reporting-unified/issues/21#issuecomment-209238666","issue_url":"https://api.github.com/repos/eResearchSA/reporting-unified/issues/21","id":209238666,"user":{"login":"Li-ReDBox","id":3203171,"avatar_url":"https://avatars.githubusercontent.com/u/3203171?v=3","gravatar_id":"","url":"https://api.github.com/users/Li-ReDBox","html_url":"https://github.com/Li-ReDBox","followers_url":"https://api.github.com/users/Li-ReDBox/followers","following_url":"https://api.github.com/users/Li-ReDBox/following{/other_user}","gists_url":"https://api.github.com/users/Li-ReDBox/gists{/gist_id}","starred_url":"https://api.github.com/users/Li-ReDBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Li-ReDBox/subscriptions","organizations_url":"https://api.github.com/users/Li-ReDBox/orgs","repos_url":"https://api.github.com/users/Li-ReDBox/repos","events_url":"https://api.github.com/users/Li-ReDBox/events{/privacy}","received_events_url":"https://api.github.com/users/Li-ReDBox/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T05:45:49Z","updated_at":"2016-04-13T05:45:49Z","body":"Maybe related, not sure though.\r\n\r\nFor XFS, when there is no file name guard, data can be duplicated. "}}