{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/22870499","id":22870499,"diff_hunk":"@@ -292,6 +292,16 @@ def single_result(sql, params):\n \n     if product:\n         total = total.filter(products=product)\n+        has_forum = product.questions_locales.filter(locale=locale).exists()\n+\n+    ignore_categories = [str(ADMINISTRATION_CATEGORY),\n+                         str(NAVIGATION_CATEGORY),\n+                         str(HOW_TO_CONTRIBUTE_CATEGORY)]\n+\n+    if not product or not has_forum:\n+        ignore_categories.append(str(CANNED_RESPONSES_CATEGORY))\n+\n+    total = total.exclude(category__in=ignore_categories)\n \n     total_docs = total.filter(is_template=False).exclude(\n         category__in=[HOW_TO_CONTRIBUTE_CATEGORY]).count()","path":"kitsune/dashboards/readouts.py","position":16,"original_position":16,"commit_id":"2479b7ef9c6a5ae02f07321964bc3f68ad91372e","original_commit_id":"2479b7ef9c6a5ae02f07321964bc3f68ad91372e","user":{"login":"rlr","id":36629,"avatar_url":"https://avatars.githubusercontent.com/u/36629?v=3","gravatar_id":"","url":"https://api.github.com/users/rlr","html_url":"https://github.com/rlr","followers_url":"https://api.github.com/users/rlr/followers","following_url":"https://api.github.com/users/rlr/following{/other_user}","gists_url":"https://api.github.com/users/rlr/gists{/gist_id}","starred_url":"https://api.github.com/users/rlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlr/subscriptions","organizations_url":"https://api.github.com/users/rlr/orgs","repos_url":"https://api.github.com/users/rlr/repos","events_url":"https://api.github.com/users/rlr/events{/privacy}","received_events_url":"https://api.github.com/users/rlr/received_events","type":"User","site_admin":false},"body":"^^ This guy is excluding one of the categories you already excluded above. I think you can remove it here?","created_at":"2015-01-13T15:49:42Z","updated_at":"2015-01-13T15:49:42Z","html_url":"https://github.com/mozilla/kitsune/pull/2297#discussion_r22870499","pull_request_url":"https://api.github.com/repos/mozilla/kitsune/pulls/2297","_links":{"self":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/22870499"},"html":{"href":"https://github.com/mozilla/kitsune/pull/2297#discussion_r22870499"},"pull_request":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2297"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/kitsune/pulls/2297","id":26882814,"html_url":"https://github.com/mozilla/kitsune/pull/2297","diff_url":"https://github.com/mozilla/kitsune/pull/2297.diff","patch_url":"https://github.com/mozilla/kitsune/pull/2297.patch","issue_url":"https://api.github.com/repos/mozilla/kitsune/issues/2297","number":2297,"state":"open","locked":false,"title":"[bug 1042231] Canned responses in the L10N dashboard","user":{"login":"rehandalal","id":987136,"avatar_url":"https://avatars.githubusercontent.com/u/987136?v=3","gravatar_id":"","url":"https://api.github.com/users/rehandalal","html_url":"https://github.com/rehandalal","followers_url":"https://api.github.com/users/rehandalal/followers","following_url":"https://api.github.com/users/rehandalal/following{/other_user}","gists_url":"https://api.github.com/users/rehandalal/gists{/gist_id}","starred_url":"https://api.github.com/users/rehandalal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rehandalal/subscriptions","organizations_url":"https://api.github.com/users/rehandalal/orgs","repos_url":"https://api.github.com/users/rehandalal/repos","events_url":"https://api.github.com/users/rehandalal/events{/privacy}","received_events_url":"https://api.github.com/users/rehandalal/received_events","type":"User","site_admin":false},"body":"r?","created_at":"2015-01-06T11:13:30Z","updated_at":"2015-01-13T15:49:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b149fa39a451f50ea0a545bd31d977da1a408b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/kitsune/pulls/2297/commits","review_comments_url":"https://api.github.com/repos/mozilla/kitsune/pulls/2297/comments","review_comment_url":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/kitsune/issues/2297/comments","statuses_url":"https://api.github.com/repos/mozilla/kitsune/statuses/2479b7ef9c6a5ae02f07321964bc3f68ad91372e","head":{"label":"rehandalal:l10n-db-canned","ref":"l10n-db-canned","sha":"2479b7ef9c6a5ae02f07321964bc3f68ad91372e","user":{"login":"rehandalal","id":987136,"avatar_url":"https://avatars.githubusercontent.com/u/987136?v=3","gravatar_id":"","url":"https://api.github.com/users/rehandalal","html_url":"https://github.com/rehandalal","followers_url":"https://api.github.com/users/rehandalal/followers","following_url":"https://api.github.com/users/rehandalal/following{/other_user}","gists_url":"https://api.github.com/users/rehandalal/gists{/gist_id}","starred_url":"https://api.github.com/users/rehandalal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rehandalal/subscriptions","organizations_url":"https://api.github.com/users/rehandalal/orgs","repos_url":"https://api.github.com/users/rehandalal/repos","events_url":"https://api.github.com/users/rehandalal/events{/privacy}","received_events_url":"https://api.github.com/users/rehandalal/received_events","type":"User","site_admin":false},"repo":{"id":4328128,"name":"kitsune","full_name":"rehandalal/kitsune","owner":{"login":"rehandalal","id":987136,"avatar_url":"https://avatars.githubusercontent.com/u/987136?v=3","gravatar_id":"","url":"https://api.github.com/users/rehandalal","html_url":"https://github.com/rehandalal","followers_url":"https://api.github.com/users/rehandalal/followers","following_url":"https://api.github.com/users/rehandalal/following{/other_user}","gists_url":"https://api.github.com/users/rehandalal/gists{/gist_id}","starred_url":"https://api.github.com/users/rehandalal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rehandalal/subscriptions","organizations_url":"https://api.github.com/users/rehandalal/orgs","repos_url":"https://api.github.com/users/rehandalal/repos","events_url":"https://api.github.com/users/rehandalal/events{/privacy}","received_events_url":"https://api.github.com/users/rehandalal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rehandalal/kitsune","description":"Platform for Firefox Help","fork":true,"url":"https://api.github.com/repos/rehandalal/kitsune","forks_url":"https://api.github.com/repos/rehandalal/kitsune/forks","keys_url":"https://api.github.com/repos/rehandalal/kitsune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rehandalal/kitsune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rehandalal/kitsune/teams","hooks_url":"https://api.github.com/repos/rehandalal/kitsune/hooks","issue_events_url":"https://api.github.com/repos/rehandalal/kitsune/issues/events{/number}","events_url":"https://api.github.com/repos/rehandalal/kitsune/events","assignees_url":"https://api.github.com/repos/rehandalal/kitsune/assignees{/user}","branches_url":"https://api.github.com/repos/rehandalal/kitsune/branches{/branch}","tags_url":"https://api.github.com/repos/rehandalal/kitsune/tags","blobs_url":"https://api.github.com/repos/rehandalal/kitsune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rehandalal/kitsune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rehandalal/kitsune/git/refs{/sha}","trees_url":"https://api.github.com/repos/rehandalal/kitsune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rehandalal/kitsune/statuses/{sha}","languages_url":"https://api.github.com/repos/rehandalal/kitsune/languages","stargazers_url":"https://api.github.com/repos/rehandalal/kitsune/stargazers","contributors_url":"https://api.github.com/repos/rehandalal/kitsune/contributors","subscribers_url":"https://api.github.com/repos/rehandalal/kitsune/subscribers","subscription_url":"https://api.github.com/repos/rehandalal/kitsune/subscription","commits_url":"https://api.github.com/repos/rehandalal/kitsune/commits{/sha}","git_commits_url":"https://api.github.com/repos/rehandalal/kitsune/git/commits{/sha}","comments_url":"https://api.github.com/repos/rehandalal/kitsune/comments{/number}","issue_comment_url":"https://api.github.com/repos/rehandalal/kitsune/issues/comments/{number}","contents_url":"https://api.github.com/repos/rehandalal/kitsune/contents/{+path}","compare_url":"https://api.github.com/repos/rehandalal/kitsune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rehandalal/kitsune/merges","archive_url":"https://api.github.com/repos/rehandalal/kitsune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rehandalal/kitsune/downloads","issues_url":"https://api.github.com/repos/rehandalal/kitsune/issues{/number}","pulls_url":"https://api.github.com/repos/rehandalal/kitsune/pulls{/number}","milestones_url":"https://api.github.com/repos/rehandalal/kitsune/milestones{/number}","notifications_url":"https://api.github.com/repos/rehandalal/kitsune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rehandalal/kitsune/labels{/name}","releases_url":"https://api.github.com/repos/rehandalal/kitsune/releases{/id}","created_at":"2012-05-14T19:41:48Z","updated_at":"2015-01-13T13:17:38Z","pushed_at":"2015-01-13T13:48:09Z","git_url":"git://github.com/rehandalal/kitsune.git","ssh_url":"git@github.com:rehandalal/kitsune.git","clone_url":"https://github.com/rehandalal/kitsune.git","svn_url":"https://github.com/rehandalal/kitsune","homepage":"http://support.mozilla.com/","size":93920,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"mozilla:master","ref":"master","sha":"a8e4777525c99a74b8d06ba87ef52730ad3527bc","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":489645,"name":"kitsune","full_name":"mozilla/kitsune","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/kitsune","description":"Platform for Mozilla Support","fork":false,"url":"https://api.github.com/repos/mozilla/kitsune","forks_url":"https://api.github.com/repos/mozilla/kitsune/forks","keys_url":"https://api.github.com/repos/mozilla/kitsune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/kitsune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/kitsune/teams","hooks_url":"https://api.github.com/repos/mozilla/kitsune/hooks","issue_events_url":"https://api.github.com/repos/mozilla/kitsune/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/kitsune/events","assignees_url":"https://api.github.com/repos/mozilla/kitsune/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/kitsune/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/kitsune/tags","blobs_url":"https://api.github.com/repos/mozilla/kitsune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/kitsune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/kitsune/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/kitsune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/kitsune/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/kitsune/languages","stargazers_url":"https://api.github.com/repos/mozilla/kitsune/stargazers","contributors_url":"https://api.github.com/repos/mozilla/kitsune/contributors","subscribers_url":"https://api.github.com/repos/mozilla/kitsune/subscribers","subscription_url":"https://api.github.com/repos/mozilla/kitsune/subscription","commits_url":"https://api.github.com/repos/mozilla/kitsune/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/kitsune/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/kitsune/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/kitsune/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/kitsune/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/kitsune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/kitsune/merges","archive_url":"https://api.github.com/repos/mozilla/kitsune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/kitsune/downloads","issues_url":"https://api.github.com/repos/mozilla/kitsune/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/kitsune/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/kitsune/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/kitsune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/kitsune/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/kitsune/releases{/id}","created_at":"2010-01-26T18:53:57Z","updated_at":"2015-01-13T15:47:36Z","pushed_at":"2015-01-13T15:47:35Z","git_url":"git://github.com/mozilla/kitsune.git","ssh_url":"git@github.com:mozilla/kitsune.git","clone_url":"https://github.com/mozilla/kitsune.git","svn_url":"https://github.com/mozilla/kitsune","homepage":"http://support.mozilla.com/","size":154260,"stargazers_count":260,"watchers_count":260,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":241,"mirror_url":null,"open_issues_count":5,"forks":241,"open_issues":5,"watchers":260,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2297"},"html":{"href":"https://github.com/mozilla/kitsune/pull/2297"},"issue":{"href":"https://api.github.com/repos/mozilla/kitsune/issues/2297"},"comments":{"href":"https://api.github.com/repos/mozilla/kitsune/issues/2297/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2297/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2297/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/kitsune/statuses/2479b7ef9c6a5ae02f07321964bc3f68ad91372e"}}}}