{"action":"created","comment":{"url":"https://api.github.com/repos/18F/openFEC-web-app/pulls/comments/74814077","id":74814077,"diff_hunk":"@@ -86,14 +86,26 @@ def load_legal_advisory_opinion(ao_no):\n     if not (documents and len(documents)):\n         return None\n \n-    canonical_document = documents[0]\n+    for document in documents:\n+        canonical_document = document\n+        if document['category'] == 'Final Opinion':\n+            break        \n+    \n+    if not canonical_document:","path":"openfecwebapp/api_caller.py","position":10,"original_position":10,"commit_id":"88f15efd1721b17d55afb4de6907439b06138921","original_commit_id":"88f15efd1721b17d55afb4de6907439b06138921","user":{"login":"adborden","id":509703,"avatar_url":"https://avatars.githubusercontent.com/u/509703?v=3","gravatar_id":"","url":"https://api.github.com/users/adborden","html_url":"https://github.com/adborden","followers_url":"https://api.github.com/users/adborden/followers","following_url":"https://api.github.com/users/adborden/following{/other_user}","gists_url":"https://api.github.com/users/adborden/gists{/gist_id}","starred_url":"https://api.github.com/users/adborden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adborden/subscriptions","organizations_url":"https://api.github.com/users/adborden/orgs","repos_url":"https://api.github.com/users/adborden/repos","events_url":"https://api.github.com/users/adborden/events{/privacy}","received_events_url":"https://api.github.com/users/adborden/received_events","type":"User","site_admin":false},"body":"This condition should never happen though...","created_at":"2016-08-15T18:57:31Z","updated_at":"2016-08-15T18:57:31Z","html_url":"https://github.com/18F/openFEC-web-app/pull/1524#discussion_r74814077","pull_request_url":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524","_links":{"self":{"href":"https://api.github.com/repos/18F/openFEC-web-app/pulls/comments/74814077"},"html":{"href":"https://github.com/18F/openFEC-web-app/pull/1524#discussion_r74814077"},"pull_request":{"href":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524"}}},"pull_request":{"url":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524","id":81347585,"html_url":"https://github.com/18F/openFEC-web-app/pull/1524","diff_url":"https://github.com/18F/openFEC-web-app/pull/1524.diff","patch_url":"https://github.com/18F/openFEC-web-app/pull/1524.patch","issue_url":"https://api.github.com/repos/18F/openFEC-web-app/issues/1524","number":1524,"state":"open","locked":false,"title":"updating URL for Final Opinion","user":{"login":"porta-antiporta","id":16668007,"avatar_url":"https://avatars.githubusercontent.com/u/16668007?v=3","gravatar_id":"","url":"https://api.github.com/users/porta-antiporta","html_url":"https://github.com/porta-antiporta","followers_url":"https://api.github.com/users/porta-antiporta/followers","following_url":"https://api.github.com/users/porta-antiporta/following{/other_user}","gists_url":"https://api.github.com/users/porta-antiporta/gists{/gist_id}","starred_url":"https://api.github.com/users/porta-antiporta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porta-antiporta/subscriptions","organizations_url":"https://api.github.com/users/porta-antiporta/orgs","repos_url":"https://api.github.com/users/porta-antiporta/repos","events_url":"https://api.github.com/users/porta-antiporta/events{/privacy}","received_events_url":"https://api.github.com/users/porta-antiporta/received_events","type":"User","site_admin":false},"body":"The current AO canonical page has a \"Final Opinion\" button that does not pull up the Final Opinion.\r\nThis PR addresses that and the edge cases where there is no Final Opinion.","created_at":"2016-08-15T17:49:13Z","updated_at":"2016-08-15T18:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efec948e27caea87157544501bd10758f7b78366","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524/commits","review_comments_url":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524/comments","review_comment_url":"https://api.github.com/repos/18F/openFEC-web-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/openFEC-web-app/issues/1524/comments","statuses_url":"https://api.github.com/repos/18F/openFEC-web-app/statuses/88f15efd1721b17d55afb4de6907439b06138921","head":{"label":"18F:final_opinion","ref":"final_opinion","sha":"88f15efd1721b17d55afb4de6907439b06138921","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":25273785,"name":"openFEC-web-app","full_name":"18F/openFEC-web-app","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/openFEC-web-app","description":"The betaFEC web app for exploring campaign finance data","fork":false,"url":"https://api.github.com/repos/18F/openFEC-web-app","forks_url":"https://api.github.com/repos/18F/openFEC-web-app/forks","keys_url":"https://api.github.com/repos/18F/openFEC-web-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/openFEC-web-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/openFEC-web-app/teams","hooks_url":"https://api.github.com/repos/18F/openFEC-web-app/hooks","issue_events_url":"https://api.github.com/repos/18F/openFEC-web-app/issues/events{/number}","events_url":"https://api.github.com/repos/18F/openFEC-web-app/events","assignees_url":"https://api.github.com/repos/18F/openFEC-web-app/assignees{/user}","branches_url":"https://api.github.com/repos/18F/openFEC-web-app/branches{/branch}","tags_url":"https://api.github.com/repos/18F/openFEC-web-app/tags","blobs_url":"https://api.github.com/repos/18F/openFEC-web-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/openFEC-web-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/openFEC-web-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/openFEC-web-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/openFEC-web-app/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/openFEC-web-app/languages","stargazers_url":"https://api.github.com/repos/18F/openFEC-web-app/stargazers","contributors_url":"https://api.github.com/repos/18F/openFEC-web-app/contributors","subscribers_url":"https://api.github.com/repos/18F/openFEC-web-app/subscribers","subscription_url":"https://api.github.com/repos/18F/openFEC-web-app/subscription","commits_url":"https://api.github.com/repos/18F/openFEC-web-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/openFEC-web-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/openFEC-web-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/openFEC-web-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/openFEC-web-app/contents/{+path}","compare_url":"https://api.github.com/repos/18F/openFEC-web-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/openFEC-web-app/merges","archive_url":"https://api.github.com/repos/18F/openFEC-web-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/openFEC-web-app/downloads","issues_url":"https://api.github.com/repos/18F/openFEC-web-app/issues{/number}","pulls_url":"https://api.github.com/repos/18F/openFEC-web-app/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/openFEC-web-app/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/openFEC-web-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/openFEC-web-app/labels{/name}","releases_url":"https://api.github.com/repos/18F/openFEC-web-app/releases{/id}","deployments_url":"https://api.github.com/repos/18F/openFEC-web-app/deployments","created_at":"2014-10-15T21:12:32Z","updated_at":"2016-08-12T03:50:04Z","pushed_at":"2016-08-15T18:55:16Z","git_url":"git://github.com/18F/openFEC-web-app.git","ssh_url":"git@github.com:18F/openFEC-web-app.git","clone_url":"https://github.com/18F/openFEC-web-app.git","svn_url":"https://github.com/18F/openFEC-web-app","homepage":"https://beta.fec.gov/data","size":13106,"stargazers_count":32,"watchers_count":32,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":172,"forks":23,"open_issues":172,"watchers":32,"default_branch":"develop"}},"base":{"label":"18F:develop","ref":"develop","sha":"e5f928f157224ed1e3d0369b2333807e9b173402","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":25273785,"name":"openFEC-web-app","full_name":"18F/openFEC-web-app","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/openFEC-web-app","description":"The betaFEC web app for exploring campaign finance data","fork":false,"url":"https://api.github.com/repos/18F/openFEC-web-app","forks_url":"https://api.github.com/repos/18F/openFEC-web-app/forks","keys_url":"https://api.github.com/repos/18F/openFEC-web-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/openFEC-web-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/openFEC-web-app/teams","hooks_url":"https://api.github.com/repos/18F/openFEC-web-app/hooks","issue_events_url":"https://api.github.com/repos/18F/openFEC-web-app/issues/events{/number}","events_url":"https://api.github.com/repos/18F/openFEC-web-app/events","assignees_url":"https://api.github.com/repos/18F/openFEC-web-app/assignees{/user}","branches_url":"https://api.github.com/repos/18F/openFEC-web-app/branches{/branch}","tags_url":"https://api.github.com/repos/18F/openFEC-web-app/tags","blobs_url":"https://api.github.com/repos/18F/openFEC-web-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/openFEC-web-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/openFEC-web-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/openFEC-web-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/openFEC-web-app/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/openFEC-web-app/languages","stargazers_url":"https://api.github.com/repos/18F/openFEC-web-app/stargazers","contributors_url":"https://api.github.com/repos/18F/openFEC-web-app/contributors","subscribers_url":"https://api.github.com/repos/18F/openFEC-web-app/subscribers","subscription_url":"https://api.github.com/repos/18F/openFEC-web-app/subscription","commits_url":"https://api.github.com/repos/18F/openFEC-web-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/openFEC-web-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/openFEC-web-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/openFEC-web-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/openFEC-web-app/contents/{+path}","compare_url":"https://api.github.com/repos/18F/openFEC-web-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/openFEC-web-app/merges","archive_url":"https://api.github.com/repos/18F/openFEC-web-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/openFEC-web-app/downloads","issues_url":"https://api.github.com/repos/18F/openFEC-web-app/issues{/number}","pulls_url":"https://api.github.com/repos/18F/openFEC-web-app/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/openFEC-web-app/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/openFEC-web-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/openFEC-web-app/labels{/name}","releases_url":"https://api.github.com/repos/18F/openFEC-web-app/releases{/id}","deployments_url":"https://api.github.com/repos/18F/openFEC-web-app/deployments","created_at":"2014-10-15T21:12:32Z","updated_at":"2016-08-12T03:50:04Z","pushed_at":"2016-08-15T18:55:16Z","git_url":"git://github.com/18F/openFEC-web-app.git","ssh_url":"git@github.com:18F/openFEC-web-app.git","clone_url":"https://github.com/18F/openFEC-web-app.git","svn_url":"https://github.com/18F/openFEC-web-app","homepage":"https://beta.fec.gov/data","size":13106,"stargazers_count":32,"watchers_count":32,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":172,"forks":23,"open_issues":172,"watchers":32,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524"},"html":{"href":"https://github.com/18F/openFEC-web-app/pull/1524"},"issue":{"href":"https://api.github.com/repos/18F/openFEC-web-app/issues/1524"},"comments":{"href":"https://api.github.com/repos/18F/openFEC-web-app/issues/1524/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/openFEC-web-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/openFEC-web-app/pulls/1524/commits"},"statuses":{"href":"https://api.github.com/repos/18F/openFEC-web-app/statuses/88f15efd1721b17d55afb4de6907439b06138921"}}}}
{"actor":{"display_login":"adborden"}}