{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/labadmin/pulls/comments/42948957","id":42948957,"diff_hunk":"@@ -147,44 +147,33 @@ def get_ag_details(self, barcode):\n \n             survey_id = db.get_barcode_survey(barcode)\n             _, failures = db.pulldown([barcode], [])\n-            if not (ag_details['sample_date'] ==\n-                    ag_details['site_sampled'] ==\n-                    ag_details['sample_time'] == ''):\n-                # it has all sample details\n-                # (sample time, date, site)\n-                if survey_id is None:\n-                    div_id = \"not_assigned\"\n-                    message = \"Missing info\"\n-                    ag_details['email_type'] = \"0\"\n-                elif barcode in failures:\n-                    div_id = \"no_metadata\"\n-                    message = \"Cannot retrieve metadata\"\n-                    ag_details['email_type'] = \"-1\"\n-                elif survey_type[survey_id] == 'Human':\n-                    # and we can successfully retrieve sample\n-                    # metadata\n-                    div_id = \"verified\"\n-                    message = \"All good\"\n-                    ag_details['email_type'] = \"1\"\n-                elif survey_type[survey_id] == 'Animal':\n-                    div_id = \"verified_animal\"\n-                    message = \"All good\"\n-                    ag_details['email_type'] = \"1\"\n-                else:\n-                    # should never get here (this would happen\n-                    # if the metadata\n-                    # pulldown returned more than one row for a\n-                    # single barcode)\n-                    div_id = \"md_pulldown_error\"\n-                    message = (\"This barcode has multiple entries \"\n-                               \"in the database, which should \"\n-                               \"never happen. Please notify \"\n-                               \"someone on the database crew.\")\n-                    ag_details['email_type'] = \"-1\"\n+\n+            # it has all sample details\n+            # (sample time, date, site)\n+            if failures:\n+                div_id = \"no_metadata\"\n+                message = \"Cannot retrieve metadata: %s\" % failures[0][1]\n+                ag_details['email_type'] = \"-1\"","path":"knimin/handlers/barcode_util.py","position":44,"original_position":44,"commit_id":"cbe13177ebb637aed9983f008931aef6234878ff","original_commit_id":"cbe13177ebb637aed9983f008931aef6234878ff","user":{"login":"wasade","id":474290,"avatar_url":"https://avatars.githubusercontent.com/u/474290?v=3","gravatar_id":"","url":"https://api.github.com/users/wasade","html_url":"https://github.com/wasade","followers_url":"https://api.github.com/users/wasade/followers","following_url":"https://api.github.com/users/wasade/following{/other_user}","gists_url":"https://api.github.com/users/wasade/gists{/gist_id}","starred_url":"https://api.github.com/users/wasade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasade/subscriptions","organizations_url":"https://api.github.com/users/wasade/orgs","repos_url":"https://api.github.com/users/wasade/repos","events_url":"https://api.github.com/users/wasade/events{/privacy}","received_events_url":"https://api.github.com/users/wasade/received_events","type":"User","site_admin":false},"body":"why is this a magic string of a magic number?","created_at":"2015-10-25T19:19:50Z","updated_at":"2015-10-25T19:19:50Z","html_url":"https://github.com/biocore/labadmin/pull/13#discussion_r42948957","pull_request_url":"https://api.github.com/repos/biocore/labadmin/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/biocore/labadmin/pulls/comments/42948957"},"html":{"href":"https://github.com/biocore/labadmin/pull/13#discussion_r42948957"},"pull_request":{"href":"https://api.github.com/repos/biocore/labadmin/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/labadmin/pulls/13","id":48640568,"html_url":"https://github.com/biocore/labadmin/pull/13","diff_url":"https://github.com/biocore/labadmin/pull/13.diff","patch_url":"https://github.com/biocore/labadmin/pull/13.patch","issue_url":"https://api.github.com/repos/biocore/labadmin/issues/13","number":13,"state":"open","locked":false,"title":"Informative pulldown failure","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"body":"Now you have reasons for why barcodes failed to pull down.","created_at":"2015-10-23T23:19:06Z","updated_at":"2015-10-25T19:19:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eefbe7cc29900ef6d834f77aa7ef3e0d737be3d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/labadmin/pulls/13/commits","review_comments_url":"https://api.github.com/repos/biocore/labadmin/pulls/13/comments","review_comment_url":"https://api.github.com/repos/biocore/labadmin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/labadmin/issues/13/comments","statuses_url":"https://api.github.com/repos/biocore/labadmin/statuses/cbe13177ebb637aed9983f008931aef6234878ff","head":{"label":"squirrelo:informative-pulldown-failure","ref":"informative-pulldown-failure","sha":"cbe13177ebb637aed9983f008931aef6234878ff","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"repo":{"id":43972316,"name":"labadmin","full_name":"squirrelo/labadmin","owner":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squirrelo/labadmin","description":"","fork":true,"url":"https://api.github.com/repos/squirrelo/labadmin","forks_url":"https://api.github.com/repos/squirrelo/labadmin/forks","keys_url":"https://api.github.com/repos/squirrelo/labadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squirrelo/labadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squirrelo/labadmin/teams","hooks_url":"https://api.github.com/repos/squirrelo/labadmin/hooks","issue_events_url":"https://api.github.com/repos/squirrelo/labadmin/issues/events{/number}","events_url":"https://api.github.com/repos/squirrelo/labadmin/events","assignees_url":"https://api.github.com/repos/squirrelo/labadmin/assignees{/user}","branches_url":"https://api.github.com/repos/squirrelo/labadmin/branches{/branch}","tags_url":"https://api.github.com/repos/squirrelo/labadmin/tags","blobs_url":"https://api.github.com/repos/squirrelo/labadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squirrelo/labadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squirrelo/labadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/squirrelo/labadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squirrelo/labadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/squirrelo/labadmin/languages","stargazers_url":"https://api.github.com/repos/squirrelo/labadmin/stargazers","contributors_url":"https://api.github.com/repos/squirrelo/labadmin/contributors","subscribers_url":"https://api.github.com/repos/squirrelo/labadmin/subscribers","subscription_url":"https://api.github.com/repos/squirrelo/labadmin/subscription","commits_url":"https://api.github.com/repos/squirrelo/labadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/squirrelo/labadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/squirrelo/labadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/squirrelo/labadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/squirrelo/labadmin/contents/{+path}","compare_url":"https://api.github.com/repos/squirrelo/labadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squirrelo/labadmin/merges","archive_url":"https://api.github.com/repos/squirrelo/labadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squirrelo/labadmin/downloads","issues_url":"https://api.github.com/repos/squirrelo/labadmin/issues{/number}","pulls_url":"https://api.github.com/repos/squirrelo/labadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/squirrelo/labadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/squirrelo/labadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squirrelo/labadmin/labels{/name}","releases_url":"https://api.github.com/repos/squirrelo/labadmin/releases{/id}","created_at":"2015-10-09T18:13:40Z","updated_at":"2015-10-09T18:13:41Z","pushed_at":"2015-10-25T19:17:53Z","git_url":"git://github.com/squirrelo/labadmin.git","ssh_url":"git@github.com:squirrelo/labadmin.git","clone_url":"https://github.com/squirrelo/labadmin.git","svn_url":"https://github.com/squirrelo/labadmin","homepage":null,"size":3649,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"biocore:master","ref":"master","sha":"d7710c7063f461dbbdf4fdecce010934b1e4b38a","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":43971581,"name":"labadmin","full_name":"biocore/labadmin","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/labadmin","description":"Administration website for the Knight Lab","fork":false,"url":"https://api.github.com/repos/biocore/labadmin","forks_url":"https://api.github.com/repos/biocore/labadmin/forks","keys_url":"https://api.github.com/repos/biocore/labadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/labadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/labadmin/teams","hooks_url":"https://api.github.com/repos/biocore/labadmin/hooks","issue_events_url":"https://api.github.com/repos/biocore/labadmin/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/labadmin/events","assignees_url":"https://api.github.com/repos/biocore/labadmin/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/labadmin/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/labadmin/tags","blobs_url":"https://api.github.com/repos/biocore/labadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/labadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/labadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/labadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/labadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/labadmin/languages","stargazers_url":"https://api.github.com/repos/biocore/labadmin/stargazers","contributors_url":"https://api.github.com/repos/biocore/labadmin/contributors","subscribers_url":"https://api.github.com/repos/biocore/labadmin/subscribers","subscription_url":"https://api.github.com/repos/biocore/labadmin/subscription","commits_url":"https://api.github.com/repos/biocore/labadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/labadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/labadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/labadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/labadmin/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/labadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/labadmin/merges","archive_url":"https://api.github.com/repos/biocore/labadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/labadmin/downloads","issues_url":"https://api.github.com/repos/biocore/labadmin/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/labadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/labadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/labadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/labadmin/labels{/name}","releases_url":"https://api.github.com/repos/biocore/labadmin/releases{/id}","created_at":"2015-10-09T17:57:39Z","updated_at":"2015-10-09T18:31:17Z","pushed_at":"2015-10-25T19:17:53Z","git_url":"git://github.com/biocore/labadmin.git","ssh_url":"git@github.com:biocore/labadmin.git","clone_url":"https://github.com/biocore/labadmin.git","svn_url":"https://github.com/biocore/labadmin","homepage":"","size":3777,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/labadmin/pulls/13"},"html":{"href":"https://github.com/biocore/labadmin/pull/13"},"issue":{"href":"https://api.github.com/repos/biocore/labadmin/issues/13"},"comments":{"href":"https://api.github.com/repos/biocore/labadmin/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/labadmin/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/labadmin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/labadmin/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/labadmin/statuses/cbe13177ebb637aed9983f008931aef6234878ff"}}}}