{"action":"created","comment":{"url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments/43489430","id":43489430,"diff_hunk":"@@ -191,8 +191,8 @@ role {\n \n                 $args{entity0} = $field->{forward} ? $source : $target;\n                 $args{entity1} = $field->{forward} ? $target : $source;\n-                $args{entity0_credit} = $field->{entity0_credit};\n-                $args{entity1_credit} = $field->{entity1_credit};\n+                $args{entity0_credit} = $field->{entity0_credit} if exists $field->{entity0_credit};","path":"lib/MusicBrainz/Server/Controller/Role/EditRelationships.pm","position":6,"original_position":6,"commit_id":"723a9f3b138e8dea35b74f726f96793ddae4a9c1","original_commit_id":"723a9f3b138e8dea35b74f726f96793ddae4a9c1","user":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"body":"Right, FormHandler will not include keys for fields that weren't submitted, which is why `exists` is used there.\r\n\r\nThe code below is slightly different, 'cause there are multiple places in the code that call `Data::Relationship::update`. I haven't checked thoroughly, but I'm sure some `undef` credits will end up there, so I used `defined` because `undef` isn't valid either way.","created_at":"2015-10-30T10:41:37Z","updated_at":"2015-10-30T10:41:37Z","html_url":"https://github.com/metabrainz/musicbrainz-server/pull/107#discussion_r43489430","pull_request_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments/43489430"},"html":{"href":"https://github.com/metabrainz/musicbrainz-server/pull/107#discussion_r43489430"},"pull_request":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107","id":49062998,"html_url":"https://github.com/metabrainz/musicbrainz-server/pull/107","diff_url":"https://github.com/metabrainz/musicbrainz-server/pull/107.diff","patch_url":"https://github.com/metabrainz/musicbrainz-server/pull/107.patch","issue_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/107","number":107,"state":"open","locked":false,"title":"MBS-8590: Can't clear relationship credits","user":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-28T20:34:50Z","updated_at":"2015-10-30T10:41:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4de604f7c871760cac26731f9825e25969ef7f8e","assignee":{"login":"gentlecat","id":460525,"avatar_url":"https://avatars.githubusercontent.com/u/460525?v=3","gravatar_id":"","url":"https://api.github.com/users/gentlecat","html_url":"https://github.com/gentlecat","followers_url":"https://api.github.com/users/gentlecat/followers","following_url":"https://api.github.com/users/gentlecat/following{/other_user}","gists_url":"https://api.github.com/users/gentlecat/gists{/gist_id}","starred_url":"https://api.github.com/users/gentlecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentlecat/subscriptions","organizations_url":"https://api.github.com/users/gentlecat/orgs","repos_url":"https://api.github.com/users/gentlecat/repos","events_url":"https://api.github.com/users/gentlecat/events{/privacy}","received_events_url":"https://api.github.com/users/gentlecat/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107/commits","review_comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107/comments","review_comment_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/107/comments","statuses_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/723a9f3b138e8dea35b74f726f96793ddae4a9c1","head":{"label":"mwiencek:mbs-8590","ref":"mbs-8590","sha":"723a9f3b138e8dea35b74f726f96793ddae4a9c1","user":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"repo":{"id":5002261,"name":"musicbrainz-server","full_name":"mwiencek/musicbrainz-server","owner":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwiencek/musicbrainz-server","description":"A mirror of git.musicbrainz.org/musicbrainz-server.git","fork":true,"url":"https://api.github.com/repos/mwiencek/musicbrainz-server","forks_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/forks","keys_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/teams","hooks_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/events","assignees_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/tags","blobs_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/languages","stargazers_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/subscription","commits_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/merges","archive_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/downloads","issues_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/releases{/id}","created_at":"2012-07-12T10:57:07Z","updated_at":"2014-09-09T04:04:28Z","pushed_at":"2015-10-28T20:34:26Z","git_url":"git://github.com/mwiencek/musicbrainz-server.git","ssh_url":"git@github.com:mwiencek/musicbrainz-server.git","clone_url":"https://github.com/mwiencek/musicbrainz-server.git","svn_url":"https://github.com/mwiencek/musicbrainz-server","homepage":"http://musicbrainz.org/doc/MusicBrainz_Server","size":80729,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"metabrainz:beta","ref":"beta","sha":"90f2c5032c3efa900607795b727c15fad4545ee5","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":697520,"name":"musicbrainz-server","full_name":"metabrainz/musicbrainz-server","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/musicbrainz-server","description":"The official musicbrainz-server codebase","fork":false,"url":"https://api.github.com/repos/metabrainz/musicbrainz-server","forks_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/forks","keys_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/teams","hooks_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/events","assignees_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/tags","blobs_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/languages","stargazers_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/subscription","commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/merges","archive_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/downloads","issues_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/releases{/id}","created_at":"2010-06-01T16:30:04Z","updated_at":"2015-10-29T12:58:45Z","pushed_at":"2015-10-28T20:52:35Z","git_url":"git://github.com/metabrainz/musicbrainz-server.git","ssh_url":"git@github.com:metabrainz/musicbrainz-server.git","clone_url":"https://github.com/metabrainz/musicbrainz-server.git","svn_url":"https://github.com/metabrainz/musicbrainz-server","homepage":"http://musicbrainz.org/doc/MusicBrainz_Server","size":133980,"stargazers_count":205,"watchers_count":205,"language":"Perl","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":1,"forks":83,"open_issues":1,"watchers":205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107"},"html":{"href":"https://github.com/metabrainz/musicbrainz-server/pull/107"},"issue":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/107"},"comments":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/723a9f3b138e8dea35b74f726f96793ddae4a9c1"}}}}