{"action":"created","comment":{"url":"https://api.github.com/repos/guberti/epschedule/pulls/comments/39923014","id":39923014,"diff_hunk":"@@ -611,49 +611,50 @@ def get(self):\n             self.error(403)\n             return\n \n-        verification = {}\n-\n-        query = db.GqlQuery(\"SELECT * FROM User\")\n-        for query_result in query:\n-            if not query_result.email in verification:\n-                verification[query_result.email] = {'verified': 0, 'unverified': 0}\n-            verification[query_result.email][self.get_key(query_result.verified)] += 1\n+        verification = self.read_db()\n \n         html = \"<h1>Stats</h1>\"\n \n         html += \"<h2>\" + str(len(verification))\n         html += \" unique emails entered</h2>\"\n \n-        only_verified = sorted([ k for k,v in verification.iteritems() if v['verified'] == 1 and v['unverified'] == 0 ])\n+        only_verified = sorted([ k for k,v in verification.iteritems() if len(v['verified']) == 1 and len(v['unverified']) == 0 ])\n         html += \"<h3>\" + str(len(only_verified)) + \" emails in good condition</h3>\"\n         for email in only_verified:\n             html += email + \"<br>\"\n \n-        verified_and_unverified = sorted([ k for k,v in verification.iteritems() if v['verified'] >= 1 and v['unverified'] >= 1 ])\n+        verified_and_unverified = sorted([ k for k,v in verification.iteritems() if len(v['verified']) >= 1 and len(v['unverified']) >= 1 ])\n         html += \"<h3>\" + str(len(verified_and_unverified)) + \" emails with verified and unverified records</h3>\"\n         for email in verified_and_unverified:\n-            html += email + \" [\" + str(verification[email]['unverified']) + \"]<br>\"\n+            html += email + \" [\" + str(len(verification[email]['unverified'])) + \"]<br>\"\n \n-        only_unverified = sorted([ k for k,v in verification.iteritems() if v['verified'] == 0 and v['unverified'] >= 1 ])\n+        only_unverified = sorted([ k for k,v in verification.iteritems() if len(v['verified']) == 0 and len(v['unverified']) >= 1 ])\n         html += \"<h3>\" + str(len(only_unverified)) + \" emails with only unverified records</h3>\"\n         for email in only_unverified:\n-            html += email + \" [\" + str(verification[email]['unverified']) + \"]<br>\"\n+            html += email + \" [\" + str(len(verification[email]['unverified'])) + \"]<br>\"","path":"main.py","position":36,"original_position":36,"commit_id":"f6596aceb10ce6d38990e64a1d2f1194b98e9d02","original_commit_id":"e6343d0512e32c86c55b6fa473300694dbc21570","user":{"login":"juberti","id":1821693,"avatar_url":"https://avatars.githubusercontent.com/u/1821693?v=3","gravatar_id":"","url":"https://api.github.com/users/juberti","html_url":"https://github.com/juberti","followers_url":"https://api.github.com/users/juberti/followers","following_url":"https://api.github.com/users/juberti/following{/other_user}","gists_url":"https://api.github.com/users/juberti/gists{/gist_id}","starred_url":"https://api.github.com/users/juberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juberti/subscriptions","organizations_url":"https://api.github.com/users/juberti/orgs","repos_url":"https://api.github.com/users/juberti/repos","events_url":"https://api.github.com/users/juberti/events{/privacy}","received_events_url":"https://api.github.com/users/juberti/received_events","type":"User","site_admin":false},"body":"add a thing here to print out if a schedule exists for the specified email (so we know if they even can log in or not)","created_at":"2015-09-19T19:44:27Z","updated_at":"2015-09-19T19:44:27Z","html_url":"https://github.com/guberti/epschedule/pull/194#discussion_r39923014","pull_request_url":"https://api.github.com/repos/guberti/epschedule/pulls/194","_links":{"self":{"href":"https://api.github.com/repos/guberti/epschedule/pulls/comments/39923014"},"html":{"href":"https://github.com/guberti/epschedule/pull/194#discussion_r39923014"},"pull_request":{"href":"https://api.github.com/repos/guberti/epschedule/pulls/194"}}},"pull_request":{"url":"https://api.github.com/repos/guberti/epschedule/pulls/194","id":45481769,"html_url":"https://github.com/guberti/epschedule/pull/194","diff_url":"https://github.com/guberti/epschedule/pull/194.diff","patch_url":"https://github.com/guberti/epschedule/pull/194.patch","issue_url":"https://api.github.com/repos/guberti/epschedule/issues/194","number":194,"state":"open","locked":false,"title":"Added a button to clean up unregistered entities of registered users","user":{"login":"guberti","id":3069006,"avatar_url":"https://avatars.githubusercontent.com/u/3069006?v=3","gravatar_id":"","url":"https://api.github.com/users/guberti","html_url":"https://github.com/guberti","followers_url":"https://api.github.com/users/guberti/followers","following_url":"https://api.github.com/users/guberti/following{/other_user}","gists_url":"https://api.github.com/users/guberti/gists{/gist_id}","starred_url":"https://api.github.com/users/guberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guberti/subscriptions","organizations_url":"https://api.github.com/users/guberti/orgs","repos_url":"https://api.github.com/users/guberti/repos","events_url":"https://api.github.com/users/guberti/events{/privacy}","received_events_url":"https://api.github.com/users/guberti/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-09-19T18:31:32Z","updated_at":"2015-09-19T19:44:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ee0ad4001a6f722656dfd09f0ec4fca127a32f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guberti/epschedule/pulls/194/commits","review_comments_url":"https://api.github.com/repos/guberti/epschedule/pulls/194/comments","review_comment_url":"https://api.github.com/repos/guberti/epschedule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guberti/epschedule/issues/194/comments","statuses_url":"https://api.github.com/repos/guberti/epschedule/statuses/f6596aceb10ce6d38990e64a1d2f1194b98e9d02","head":{"label":"guberti:Add-clean-up-db-button","ref":"Add-clean-up-db-button","sha":"f6596aceb10ce6d38990e64a1d2f1194b98e9d02","user":{"login":"guberti","id":3069006,"avatar_url":"https://avatars.githubusercontent.com/u/3069006?v=3","gravatar_id":"","url":"https://api.github.com/users/guberti","html_url":"https://github.com/guberti","followers_url":"https://api.github.com/users/guberti/followers","following_url":"https://api.github.com/users/guberti/following{/other_user}","gists_url":"https://api.github.com/users/guberti/gists{/gist_id}","starred_url":"https://api.github.com/users/guberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guberti/subscriptions","organizations_url":"https://api.github.com/users/guberti/orgs","repos_url":"https://api.github.com/users/guberti/repos","events_url":"https://api.github.com/users/guberti/events{/privacy}","received_events_url":"https://api.github.com/users/guberti/received_events","type":"User","site_admin":false},"repo":{"id":36156406,"name":"epschedule","full_name":"guberti/epschedule","owner":{"login":"guberti","id":3069006,"avatar_url":"https://avatars.githubusercontent.com/u/3069006?v=3","gravatar_id":"","url":"https://api.github.com/users/guberti","html_url":"https://github.com/guberti","followers_url":"https://api.github.com/users/guberti/followers","following_url":"https://api.github.com/users/guberti/following{/other_user}","gists_url":"https://api.github.com/users/guberti/gists{/gist_id}","starred_url":"https://api.github.com/users/guberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guberti/subscriptions","organizations_url":"https://api.github.com/users/guberti/orgs","repos_url":"https://api.github.com/users/guberti/repos","events_url":"https://api.github.com/users/guberti/events{/privacy}","received_events_url":"https://api.github.com/users/guberti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guberti/epschedule","description":"A schedule app for Eastside Preparatory School","fork":false,"url":"https://api.github.com/repos/guberti/epschedule","forks_url":"https://api.github.com/repos/guberti/epschedule/forks","keys_url":"https://api.github.com/repos/guberti/epschedule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guberti/epschedule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guberti/epschedule/teams","hooks_url":"https://api.github.com/repos/guberti/epschedule/hooks","issue_events_url":"https://api.github.com/repos/guberti/epschedule/issues/events{/number}","events_url":"https://api.github.com/repos/guberti/epschedule/events","assignees_url":"https://api.github.com/repos/guberti/epschedule/assignees{/user}","branches_url":"https://api.github.com/repos/guberti/epschedule/branches{/branch}","tags_url":"https://api.github.com/repos/guberti/epschedule/tags","blobs_url":"https://api.github.com/repos/guberti/epschedule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guberti/epschedule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guberti/epschedule/git/refs{/sha}","trees_url":"https://api.github.com/repos/guberti/epschedule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guberti/epschedule/statuses/{sha}","languages_url":"https://api.github.com/repos/guberti/epschedule/languages","stargazers_url":"https://api.github.com/repos/guberti/epschedule/stargazers","contributors_url":"https://api.github.com/repos/guberti/epschedule/contributors","subscribers_url":"https://api.github.com/repos/guberti/epschedule/subscribers","subscription_url":"https://api.github.com/repos/guberti/epschedule/subscription","commits_url":"https://api.github.com/repos/guberti/epschedule/commits{/sha}","git_commits_url":"https://api.github.com/repos/guberti/epschedule/git/commits{/sha}","comments_url":"https://api.github.com/repos/guberti/epschedule/comments{/number}","issue_comment_url":"https://api.github.com/repos/guberti/epschedule/issues/comments{/number}","contents_url":"https://api.github.com/repos/guberti/epschedule/contents/{+path}","compare_url":"https://api.github.com/repos/guberti/epschedule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guberti/epschedule/merges","archive_url":"https://api.github.com/repos/guberti/epschedule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guberti/epschedule/downloads","issues_url":"https://api.github.com/repos/guberti/epschedule/issues{/number}","pulls_url":"https://api.github.com/repos/guberti/epschedule/pulls{/number}","milestones_url":"https://api.github.com/repos/guberti/epschedule/milestones{/number}","notifications_url":"https://api.github.com/repos/guberti/epschedule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guberti/epschedule/labels{/name}","releases_url":"https://api.github.com/repos/guberti/epschedule/releases{/id}","created_at":"2015-05-24T04:46:23Z","updated_at":"2015-09-17T04:50:24Z","pushed_at":"2015-09-19T19:44:01Z","git_url":"git://github.com/guberti/epschedule.git","ssh_url":"git@github.com:guberti/epschedule.git","clone_url":"https://github.com/guberti/epschedule.git","svn_url":"https://github.com/guberti/epschedule","homepage":"https://www.epschedule.com","size":1488,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":31,"forks":0,"open_issues":31,"watchers":3,"default_branch":"master"}},"base":{"label":"guberti:master","ref":"master","sha":"168a8ba145b2e864e1633f5cad1da41974a0ddf2","user":{"login":"guberti","id":3069006,"avatar_url":"https://avatars.githubusercontent.com/u/3069006?v=3","gravatar_id":"","url":"https://api.github.com/users/guberti","html_url":"https://github.com/guberti","followers_url":"https://api.github.com/users/guberti/followers","following_url":"https://api.github.com/users/guberti/following{/other_user}","gists_url":"https://api.github.com/users/guberti/gists{/gist_id}","starred_url":"https://api.github.com/users/guberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guberti/subscriptions","organizations_url":"https://api.github.com/users/guberti/orgs","repos_url":"https://api.github.com/users/guberti/repos","events_url":"https://api.github.com/users/guberti/events{/privacy}","received_events_url":"https://api.github.com/users/guberti/received_events","type":"User","site_admin":false},"repo":{"id":36156406,"name":"epschedule","full_name":"guberti/epschedule","owner":{"login":"guberti","id":3069006,"avatar_url":"https://avatars.githubusercontent.com/u/3069006?v=3","gravatar_id":"","url":"https://api.github.com/users/guberti","html_url":"https://github.com/guberti","followers_url":"https://api.github.com/users/guberti/followers","following_url":"https://api.github.com/users/guberti/following{/other_user}","gists_url":"https://api.github.com/users/guberti/gists{/gist_id}","starred_url":"https://api.github.com/users/guberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guberti/subscriptions","organizations_url":"https://api.github.com/users/guberti/orgs","repos_url":"https://api.github.com/users/guberti/repos","events_url":"https://api.github.com/users/guberti/events{/privacy}","received_events_url":"https://api.github.com/users/guberti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guberti/epschedule","description":"A schedule app for Eastside Preparatory School","fork":false,"url":"https://api.github.com/repos/guberti/epschedule","forks_url":"https://api.github.com/repos/guberti/epschedule/forks","keys_url":"https://api.github.com/repos/guberti/epschedule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guberti/epschedule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guberti/epschedule/teams","hooks_url":"https://api.github.com/repos/guberti/epschedule/hooks","issue_events_url":"https://api.github.com/repos/guberti/epschedule/issues/events{/number}","events_url":"https://api.github.com/repos/guberti/epschedule/events","assignees_url":"https://api.github.com/repos/guberti/epschedule/assignees{/user}","branches_url":"https://api.github.com/repos/guberti/epschedule/branches{/branch}","tags_url":"https://api.github.com/repos/guberti/epschedule/tags","blobs_url":"https://api.github.com/repos/guberti/epschedule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guberti/epschedule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guberti/epschedule/git/refs{/sha}","trees_url":"https://api.github.com/repos/guberti/epschedule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guberti/epschedule/statuses/{sha}","languages_url":"https://api.github.com/repos/guberti/epschedule/languages","stargazers_url":"https://api.github.com/repos/guberti/epschedule/stargazers","contributors_url":"https://api.github.com/repos/guberti/epschedule/contributors","subscribers_url":"https://api.github.com/repos/guberti/epschedule/subscribers","subscription_url":"https://api.github.com/repos/guberti/epschedule/subscription","commits_url":"https://api.github.com/repos/guberti/epschedule/commits{/sha}","git_commits_url":"https://api.github.com/repos/guberti/epschedule/git/commits{/sha}","comments_url":"https://api.github.com/repos/guberti/epschedule/comments{/number}","issue_comment_url":"https://api.github.com/repos/guberti/epschedule/issues/comments{/number}","contents_url":"https://api.github.com/repos/guberti/epschedule/contents/{+path}","compare_url":"https://api.github.com/repos/guberti/epschedule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guberti/epschedule/merges","archive_url":"https://api.github.com/repos/guberti/epschedule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guberti/epschedule/downloads","issues_url":"https://api.github.com/repos/guberti/epschedule/issues{/number}","pulls_url":"https://api.github.com/repos/guberti/epschedule/pulls{/number}","milestones_url":"https://api.github.com/repos/guberti/epschedule/milestones{/number}","notifications_url":"https://api.github.com/repos/guberti/epschedule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guberti/epschedule/labels{/name}","releases_url":"https://api.github.com/repos/guberti/epschedule/releases{/id}","created_at":"2015-05-24T04:46:23Z","updated_at":"2015-09-17T04:50:24Z","pushed_at":"2015-09-19T19:44:01Z","git_url":"git://github.com/guberti/epschedule.git","ssh_url":"git@github.com:guberti/epschedule.git","clone_url":"https://github.com/guberti/epschedule.git","svn_url":"https://github.com/guberti/epschedule","homepage":"https://www.epschedule.com","size":1488,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":31,"forks":0,"open_issues":31,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guberti/epschedule/pulls/194"},"html":{"href":"https://github.com/guberti/epschedule/pull/194"},"issue":{"href":"https://api.github.com/repos/guberti/epschedule/issues/194"},"comments":{"href":"https://api.github.com/repos/guberti/epschedule/issues/194/comments"},"review_comments":{"href":"https://api.github.com/repos/guberti/epschedule/pulls/194/comments"},"review_comment":{"href":"https://api.github.com/repos/guberti/epschedule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guberti/epschedule/pulls/194/commits"},"statuses":{"href":"https://api.github.com/repos/guberti/epschedule/statuses/f6596aceb10ce6d38990e64a1d2f1194b98e9d02"}}}}