{"action":"created","comment":{"url":"https://api.github.com/repos/openpermissions/perch/pulls/comments/61441727","id":61441727,"diff_hunk":"@@ -229,8 +229,6 @@ def reference_links(doc):\n     \"\"\"Get reference links\"\"\"\n     if doc.get('type') == 'organisation':\n         for asset_id_type, link in doc.get('reference_links', {}).items():\n-            # TODO: The API expects this data structure, but we should change\n-            # it because there is always only one entry in \"links\".\n             value = {","path":"perch/views.py","position":6,"original_position":6,"commit_id":"684e4003938d3567a4e56164f86f4d2d1ea5ff69","original_commit_id":"684e4003938d3567a4e56164f86f4d2d1ea5ff69","user":{"login":"norapetrova","id":15727828,"avatar_url":"https://avatars.githubusercontent.com/u/15727828?v=3","gravatar_id":"","url":"https://api.github.com/users/norapetrova","html_url":"https://github.com/norapetrova","followers_url":"https://api.github.com/users/norapetrova/followers","following_url":"https://api.github.com/users/norapetrova/following{/other_user}","gists_url":"https://api.github.com/users/norapetrova/gists{/gist_id}","starred_url":"https://api.github.com/users/norapetrova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norapetrova/subscriptions","organizations_url":"https://api.github.com/users/norapetrova/orgs","repos_url":"https://api.github.com/users/norapetrova/repos","events_url":"https://api.github.com/users/norapetrova/events{/privacy}","received_events_url":"https://api.github.com/users/norapetrova/received_events","type":"User","site_admin":false},"body":"Removed this TODO because it could be the case that there are multiple keys in reference_links. For example with lobster, they could have reference links for:\r\n- LobsterPictureID\r\n- FlickrID","created_at":"2016-04-28T14:54:27Z","updated_at":"2016-04-28T14:54:27Z","html_url":"https://github.com/openpermissions/perch/pull/5#discussion_r61441727","pull_request_url":"https://api.github.com/repos/openpermissions/perch/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/openpermissions/perch/pulls/comments/61441727"},"html":{"href":"https://github.com/openpermissions/perch/pull/5#discussion_r61441727"},"pull_request":{"href":"https://api.github.com/repos/openpermissions/perch/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/openpermissions/perch/pulls/5","id":68077482,"html_url":"https://github.com/openpermissions/perch/pull/5","diff_url":"https://github.com/openpermissions/perch/pull/5.diff","patch_url":"https://github.com/openpermissions/perch/pull/5.patch","issue_url":"https://api.github.com/repos/openpermissions/perch/issues/5","number":5,"state":"open","locked":false,"title":"Check for defaults before throwing AttributeError","user":{"login":"norapetrova","id":15727828,"avatar_url":"https://avatars.githubusercontent.com/u/15727828?v=3","gravatar_id":"","url":"https://api.github.com/users/norapetrova","html_url":"https://github.com/norapetrova","followers_url":"https://api.github.com/users/norapetrova/followers","following_url":"https://api.github.com/users/norapetrova/following{/other_user}","gists_url":"https://api.github.com/users/norapetrova/gists{/gist_id}","starred_url":"https://api.github.com/users/norapetrova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norapetrova/subscriptions","organizations_url":"https://api.github.com/users/norapetrova/orgs","repos_url":"https://api.github.com/users/norapetrova/repos","events_url":"https://api.github.com/users/norapetrova/events{/privacy}","received_events_url":"https://api.github.com/users/norapetrova/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-27T15:50:04Z","updated_at":"2016-04-28T14:54:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d5ecac518b857825bce8213c1ea7c70dcf639c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openpermissions/perch/pulls/5/commits","review_comments_url":"https://api.github.com/repos/openpermissions/perch/pulls/5/comments","review_comment_url":"https://api.github.com/repos/openpermissions/perch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openpermissions/perch/issues/5/comments","statuses_url":"https://api.github.com/repos/openpermissions/perch/statuses/684e4003938d3567a4e56164f86f4d2d1ea5ff69","head":{"label":"openpermissions:return-defaults","ref":"return-defaults","sha":"684e4003938d3567a4e56164f86f4d2d1ea5ff69","user":{"login":"openpermissions","id":18423101,"avatar_url":"https://avatars.githubusercontent.com/u/18423101?v=3","gravatar_id":"","url":"https://api.github.com/users/openpermissions","html_url":"https://github.com/openpermissions","followers_url":"https://api.github.com/users/openpermissions/followers","following_url":"https://api.github.com/users/openpermissions/following{/other_user}","gists_url":"https://api.github.com/users/openpermissions/gists{/gist_id}","starred_url":"https://api.github.com/users/openpermissions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpermissions/subscriptions","organizations_url":"https://api.github.com/users/openpermissions/orgs","repos_url":"https://api.github.com/users/openpermissions/repos","events_url":"https://api.github.com/users/openpermissions/events{/privacy}","received_events_url":"https://api.github.com/users/openpermissions/received_events","type":"Organization","site_admin":false},"repo":{"id":56150516,"name":"perch","full_name":"openpermissions/perch","owner":{"login":"openpermissions","id":18423101,"avatar_url":"https://avatars.githubusercontent.com/u/18423101?v=3","gravatar_id":"","url":"https://api.github.com/users/openpermissions","html_url":"https://github.com/openpermissions","followers_url":"https://api.github.com/users/openpermissions/followers","following_url":"https://api.github.com/users/openpermissions/following{/other_user}","gists_url":"https://api.github.com/users/openpermissions/gists{/gist_id}","starred_url":"https://api.github.com/users/openpermissions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpermissions/subscriptions","organizations_url":"https://api.github.com/users/openpermissions/orgs","repos_url":"https://api.github.com/users/openpermissions/repos","events_url":"https://api.github.com/users/openpermissions/events{/privacy}","received_events_url":"https://api.github.com/users/openpermissions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openpermissions/perch","description":"Open Permissions Platform CouchDB Library","fork":false,"url":"https://api.github.com/repos/openpermissions/perch","forks_url":"https://api.github.com/repos/openpermissions/perch/forks","keys_url":"https://api.github.com/repos/openpermissions/perch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openpermissions/perch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openpermissions/perch/teams","hooks_url":"https://api.github.com/repos/openpermissions/perch/hooks","issue_events_url":"https://api.github.com/repos/openpermissions/perch/issues/events{/number}","events_url":"https://api.github.com/repos/openpermissions/perch/events","assignees_url":"https://api.github.com/repos/openpermissions/perch/assignees{/user}","branches_url":"https://api.github.com/repos/openpermissions/perch/branches{/branch}","tags_url":"https://api.github.com/repos/openpermissions/perch/tags","blobs_url":"https://api.github.com/repos/openpermissions/perch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openpermissions/perch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openpermissions/perch/git/refs{/sha}","trees_url":"https://api.github.com/repos/openpermissions/perch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openpermissions/perch/statuses/{sha}","languages_url":"https://api.github.com/repos/openpermissions/perch/languages","stargazers_url":"https://api.github.com/repos/openpermissions/perch/stargazers","contributors_url":"https://api.github.com/repos/openpermissions/perch/contributors","subscribers_url":"https://api.github.com/repos/openpermissions/perch/subscribers","subscription_url":"https://api.github.com/repos/openpermissions/perch/subscription","commits_url":"https://api.github.com/repos/openpermissions/perch/commits{/sha}","git_commits_url":"https://api.github.com/repos/openpermissions/perch/git/commits{/sha}","comments_url":"https://api.github.com/repos/openpermissions/perch/comments{/number}","issue_comment_url":"https://api.github.com/repos/openpermissions/perch/issues/comments{/number}","contents_url":"https://api.github.com/repos/openpermissions/perch/contents/{+path}","compare_url":"https://api.github.com/repos/openpermissions/perch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openpermissions/perch/merges","archive_url":"https://api.github.com/repos/openpermissions/perch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openpermissions/perch/downloads","issues_url":"https://api.github.com/repos/openpermissions/perch/issues{/number}","pulls_url":"https://api.github.com/repos/openpermissions/perch/pulls{/number}","milestones_url":"https://api.github.com/repos/openpermissions/perch/milestones{/number}","notifications_url":"https://api.github.com/repos/openpermissions/perch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openpermissions/perch/labels{/name}","releases_url":"https://api.github.com/repos/openpermissions/perch/releases{/id}","deployments_url":"https://api.github.com/repos/openpermissions/perch/deployments","created_at":"2016-04-13T12:39:02Z","updated_at":"2016-04-22T15:38:09Z","pushed_at":"2016-04-28T14:52:51Z","git_url":"git://github.com/openpermissions/perch.git","ssh_url":"git@github.com:openpermissions/perch.git","clone_url":"https://github.com/openpermissions/perch.git","svn_url":"https://github.com/openpermissions/perch","homepage":"","size":175,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"openpermissions:master","ref":"master","sha":"e8efc52070ad0f7ba9c0d103358e3a01f8b027ef","user":{"login":"openpermissions","id":18423101,"avatar_url":"https://avatars.githubusercontent.com/u/18423101?v=3","gravatar_id":"","url":"https://api.github.com/users/openpermissions","html_url":"https://github.com/openpermissions","followers_url":"https://api.github.com/users/openpermissions/followers","following_url":"https://api.github.com/users/openpermissions/following{/other_user}","gists_url":"https://api.github.com/users/openpermissions/gists{/gist_id}","starred_url":"https://api.github.com/users/openpermissions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpermissions/subscriptions","organizations_url":"https://api.github.com/users/openpermissions/orgs","repos_url":"https://api.github.com/users/openpermissions/repos","events_url":"https://api.github.com/users/openpermissions/events{/privacy}","received_events_url":"https://api.github.com/users/openpermissions/received_events","type":"Organization","site_admin":false},"repo":{"id":56150516,"name":"perch","full_name":"openpermissions/perch","owner":{"login":"openpermissions","id":18423101,"avatar_url":"https://avatars.githubusercontent.com/u/18423101?v=3","gravatar_id":"","url":"https://api.github.com/users/openpermissions","html_url":"https://github.com/openpermissions","followers_url":"https://api.github.com/users/openpermissions/followers","following_url":"https://api.github.com/users/openpermissions/following{/other_user}","gists_url":"https://api.github.com/users/openpermissions/gists{/gist_id}","starred_url":"https://api.github.com/users/openpermissions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpermissions/subscriptions","organizations_url":"https://api.github.com/users/openpermissions/orgs","repos_url":"https://api.github.com/users/openpermissions/repos","events_url":"https://api.github.com/users/openpermissions/events{/privacy}","received_events_url":"https://api.github.com/users/openpermissions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openpermissions/perch","description":"Open Permissions Platform CouchDB Library","fork":false,"url":"https://api.github.com/repos/openpermissions/perch","forks_url":"https://api.github.com/repos/openpermissions/perch/forks","keys_url":"https://api.github.com/repos/openpermissions/perch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openpermissions/perch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openpermissions/perch/teams","hooks_url":"https://api.github.com/repos/openpermissions/perch/hooks","issue_events_url":"https://api.github.com/repos/openpermissions/perch/issues/events{/number}","events_url":"https://api.github.com/repos/openpermissions/perch/events","assignees_url":"https://api.github.com/repos/openpermissions/perch/assignees{/user}","branches_url":"https://api.github.com/repos/openpermissions/perch/branches{/branch}","tags_url":"https://api.github.com/repos/openpermissions/perch/tags","blobs_url":"https://api.github.com/repos/openpermissions/perch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openpermissions/perch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openpermissions/perch/git/refs{/sha}","trees_url":"https://api.github.com/repos/openpermissions/perch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openpermissions/perch/statuses/{sha}","languages_url":"https://api.github.com/repos/openpermissions/perch/languages","stargazers_url":"https://api.github.com/repos/openpermissions/perch/stargazers","contributors_url":"https://api.github.com/repos/openpermissions/perch/contributors","subscribers_url":"https://api.github.com/repos/openpermissions/perch/subscribers","subscription_url":"https://api.github.com/repos/openpermissions/perch/subscription","commits_url":"https://api.github.com/repos/openpermissions/perch/commits{/sha}","git_commits_url":"https://api.github.com/repos/openpermissions/perch/git/commits{/sha}","comments_url":"https://api.github.com/repos/openpermissions/perch/comments{/number}","issue_comment_url":"https://api.github.com/repos/openpermissions/perch/issues/comments{/number}","contents_url":"https://api.github.com/repos/openpermissions/perch/contents/{+path}","compare_url":"https://api.github.com/repos/openpermissions/perch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openpermissions/perch/merges","archive_url":"https://api.github.com/repos/openpermissions/perch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openpermissions/perch/downloads","issues_url":"https://api.github.com/repos/openpermissions/perch/issues{/number}","pulls_url":"https://api.github.com/repos/openpermissions/perch/pulls{/number}","milestones_url":"https://api.github.com/repos/openpermissions/perch/milestones{/number}","notifications_url":"https://api.github.com/repos/openpermissions/perch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openpermissions/perch/labels{/name}","releases_url":"https://api.github.com/repos/openpermissions/perch/releases{/id}","deployments_url":"https://api.github.com/repos/openpermissions/perch/deployments","created_at":"2016-04-13T12:39:02Z","updated_at":"2016-04-22T15:38:09Z","pushed_at":"2016-04-28T14:52:51Z","git_url":"git://github.com/openpermissions/perch.git","ssh_url":"git@github.com:openpermissions/perch.git","clone_url":"https://github.com/openpermissions/perch.git","svn_url":"https://github.com/openpermissions/perch","homepage":"","size":175,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openpermissions/perch/pulls/5"},"html":{"href":"https://github.com/openpermissions/perch/pull/5"},"issue":{"href":"https://api.github.com/repos/openpermissions/perch/issues/5"},"comments":{"href":"https://api.github.com/repos/openpermissions/perch/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/openpermissions/perch/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/openpermissions/perch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openpermissions/perch/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/openpermissions/perch/statuses/684e4003938d3567a4e56164f86f4d2d1ea5ff69"}}}}