{"action":"closed","number":755,"pull_request":{"url":"https://api.github.com/repos/alphagov/signon/pulls/755","id":187761525,"html_url":"https://github.com/alphagov/signon/pull/755","diff_url":"https://github.com/alphagov/signon/pull/755.diff","patch_url":"https://github.com/alphagov/signon/pull/755.patch","issue_url":"https://api.github.com/repos/alphagov/signon/issues/755","number":755,"state":"closed","locked":false,"title":"Ensure BatchInvitation gets saved","user":{"login":"thomasleese","id":510498,"avatar_url":"https://avatars2.githubusercontent.com/u/510498?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasleese","html_url":"https://github.com/thomasleese","followers_url":"https://api.github.com/users/thomasleese/followers","following_url":"https://api.github.com/users/thomasleese/following{/other_user}","gists_url":"https://api.github.com/users/thomasleese/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasleese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasleese/subscriptions","organizations_url":"https://api.github.com/users/thomasleese/orgs","repos_url":"https://api.github.com/users/thomasleese/repos","events_url":"https://api.github.com/users/thomasleese/events{/privacy}","received_events_url":"https://api.github.com/users/thomasleese/received_events","type":"User","site_admin":false},"body":"At the moment we call `save` which returns true or false depending on whether the save actually worked. In the case when it fails, we ignore that and then continue to use it as a foreign key of the `BatchInvitationUser` model, which then fails because the `BatchInvitation` isn't saved, and when that tries to save it fails again.\r\n\r\nThis doesn't solve the problem that we're seeing with CSV imports not working, but it should push the problem further up so we can identify what's going wrong and fix it.\r\n\r\nI've also fixed a deprecation warning relating to use of `assert_equal nil`.\r\n\r\n[Trello Card](https://trello.com/c/bUCRuBSv/140-batch-upload-of-users-broken-on-sign-on-2)","created_at":"2018-05-14T09:05:25Z","updated_at":"2018-05-14T09:40:48Z","closed_at":"2018-05-14T09:40:47Z","merged_at":"2018-05-14T09:40:47Z","merge_commit_sha":"fb001a9136388677464f402a5d300948edcdfde5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/signon/pulls/755/commits","review_comments_url":"https://api.github.com/repos/alphagov/signon/pulls/755/comments","review_comment_url":"https://api.github.com/repos/alphagov/signon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/signon/issues/755/comments","statuses_url":"https://api.github.com/repos/alphagov/signon/statuses/9e87775af950c0d62aeff2f421494309a76c9a5c","head":{"label":"alphagov:ensure-save","ref":"ensure-save","sha":"9e87775af950c0d62aeff2f421494309a76c9a5c","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":3928902,"name":"signon","full_name":"alphagov/signon","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/signon","description":"Single sign-on service for GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/signon","forks_url":"https://api.github.com/repos/alphagov/signon/forks","keys_url":"https://api.github.com/repos/alphagov/signon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/signon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/signon/teams","hooks_url":"https://api.github.com/repos/alphagov/signon/hooks","issue_events_url":"https://api.github.com/repos/alphagov/signon/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/signon/events","assignees_url":"https://api.github.com/repos/alphagov/signon/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/signon/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/signon/tags","blobs_url":"https://api.github.com/repos/alphagov/signon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/signon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/signon/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/signon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/signon/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/signon/languages","stargazers_url":"https://api.github.com/repos/alphagov/signon/stargazers","contributors_url":"https://api.github.com/repos/alphagov/signon/contributors","subscribers_url":"https://api.github.com/repos/alphagov/signon/subscribers","subscription_url":"https://api.github.com/repos/alphagov/signon/subscription","commits_url":"https://api.github.com/repos/alphagov/signon/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/signon/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/signon/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/signon/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/signon/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/signon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/signon/merges","archive_url":"https://api.github.com/repos/alphagov/signon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/signon/downloads","issues_url":"https://api.github.com/repos/alphagov/signon/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/signon/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/signon/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/signon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/signon/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/signon/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/signon/deployments","created_at":"2012-04-04T13:23:55Z","updated_at":"2018-05-09T11:30:58Z","pushed_at":"2018-05-14T09:40:47Z","git_url":"git://github.com/alphagov/signon.git","ssh_url":"git@github.com:alphagov/signon.git","clone_url":"https://github.com/alphagov/signon.git","svn_url":"https://github.com/alphagov/signon","homepage":"https://docs.publishing.service.gov.uk/apps/signon.html","size":3932,"stargazers_count":58,"watchers_count":58,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":31,"open_issues":15,"watchers":58,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"8bbddee78f2ce0f6a6e559251311f619918270af","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":3928902,"name":"signon","full_name":"alphagov/signon","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/signon","description":"Single sign-on service for GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/signon","forks_url":"https://api.github.com/repos/alphagov/signon/forks","keys_url":"https://api.github.com/repos/alphagov/signon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/signon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/signon/teams","hooks_url":"https://api.github.com/repos/alphagov/signon/hooks","issue_events_url":"https://api.github.com/repos/alphagov/signon/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/signon/events","assignees_url":"https://api.github.com/repos/alphagov/signon/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/signon/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/signon/tags","blobs_url":"https://api.github.com/repos/alphagov/signon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/signon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/signon/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/signon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/signon/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/signon/languages","stargazers_url":"https://api.github.com/repos/alphagov/signon/stargazers","contributors_url":"https://api.github.com/repos/alphagov/signon/contributors","subscribers_url":"https://api.github.com/repos/alphagov/signon/subscribers","subscription_url":"https://api.github.com/repos/alphagov/signon/subscription","commits_url":"https://api.github.com/repos/alphagov/signon/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/signon/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/signon/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/signon/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/signon/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/signon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/signon/merges","archive_url":"https://api.github.com/repos/alphagov/signon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/signon/downloads","issues_url":"https://api.github.com/repos/alphagov/signon/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/signon/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/signon/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/signon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/signon/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/signon/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/signon/deployments","created_at":"2012-04-04T13:23:55Z","updated_at":"2018-05-09T11:30:58Z","pushed_at":"2018-05-14T09:40:47Z","git_url":"git://github.com/alphagov/signon.git","ssh_url":"git@github.com:alphagov/signon.git","clone_url":"https://github.com/alphagov/signon.git","svn_url":"https://github.com/alphagov/signon","homepage":"https://docs.publishing.service.gov.uk/apps/signon.html","size":3932,"stargazers_count":58,"watchers_count":58,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":31,"open_issues":15,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/signon/pulls/755"},"html":{"href":"https://github.com/alphagov/signon/pull/755"},"issue":{"href":"https://api.github.com/repos/alphagov/signon/issues/755"},"comments":{"href":"https://api.github.com/repos/alphagov/signon/issues/755/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/signon/pulls/755/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/signon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/signon/pulls/755/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/signon/statuses/9e87775af950c0d62aeff2f421494309a76c9a5c"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"thomasleese","id":510498,"avatar_url":"https://avatars2.githubusercontent.com/u/510498?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasleese","html_url":"https://github.com/thomasleese","followers_url":"https://api.github.com/users/thomasleese/followers","following_url":"https://api.github.com/users/thomasleese/following{/other_user}","gists_url":"https://api.github.com/users/thomasleese/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasleese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasleese/subscriptions","organizations_url":"https://api.github.com/users/thomasleese/orgs","repos_url":"https://api.github.com/users/thomasleese/repos","events_url":"https://api.github.com/users/thomasleese/events{/privacy}","received_events_url":"https://api.github.com/users/thomasleese/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":8,"deletions":7,"changed_files":6}}
{"actor":{"display_login":"thomasleese"}}