{"action":"created","comment":{"url":"https://api.github.com/repos/masschallenge/impact-api/pulls/comments/243432391","pull_request_review_id":187203789,"id":243432391,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzQzMjM5MQ==","diff_hunk":"@@ -48,3 +49,8 @@ def full_name(self):\n         # short_name is \"2017-04 BOS CH IL Round 1\".  See ticket\n         # AC-5694 for proposed cleanup.\n         return self.subject.short_name()\n+\n+    @property\n+    def has_criteria(self):\n+        criteria = JudgingRound.objects.get(pk=self.subject.id).criterion_set.all()\n+        return any(criteria)","path":"web/impact/impact/v1/helpers/judging_round_helper.py","position":25,"original_position":25,"commit_id":"1764732f43b495f302c1c78ffa0a9d64d81986b8","original_commit_id":"1764732f43b495f302c1c78ffa0a9d64d81986b8","user":{"login":"jonkiparsky","id":5283553,"node_id":"MDQ6VXNlcjUyODM1NTM=","avatar_url":"https://avatars3.githubusercontent.com/u/5283553?v=4","gravatar_id":"","url":"https://api.github.com/users/jonkiparsky","html_url":"https://github.com/jonkiparsky","followers_url":"https://api.github.com/users/jonkiparsky/followers","following_url":"https://api.github.com/users/jonkiparsky/following{/other_user}","gists_url":"https://api.github.com/users/jonkiparsky/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkiparsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkiparsky/subscriptions","organizations_url":"https://api.github.com/users/jonkiparsky/orgs","repos_url":"https://api.github.com/users/jonkiparsky/repos","events_url":"https://api.github.com/users/jonkiparsky/events{/privacy}","received_events_url":"https://api.github.com/users/jonkiparsky/received_events","type":"User","site_admin":false},"body":"better to use `JudgingRound.objects.get(pk=self.subject.id).criterion_set.count() > 0` rather than evaluating the queryset to see if anything is in it. ","created_at":"2018-12-20T22:05:43Z","updated_at":"2018-12-20T22:05:43Z","html_url":"https://github.com/masschallenge/impact-api/pull/242#discussion_r243432391","pull_request_url":"https://api.github.com/repos/masschallenge/impact-api/pulls/242","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/masschallenge/impact-api/pulls/comments/243432391"},"html":{"href":"https://github.com/masschallenge/impact-api/pull/242#discussion_r243432391"},"pull_request":{"href":"https://api.github.com/repos/masschallenge/impact-api/pulls/242"}}},"pull_request":{"url":"https://api.github.com/repos/masschallenge/impact-api/pulls/242","id":240310529,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMzEwNTI5","html_url":"https://github.com/masschallenge/impact-api/pull/242","diff_url":"https://github.com/masschallenge/impact-api/pull/242.diff","patch_url":"https://github.com/masschallenge/impact-api/pull/242.patch","issue_url":"https://api.github.com/repos/masschallenge/impact-api/issues/242","number":242,"state":"open","locked":false,"title":"[AC-5955] Add 'has_criteria' to the Judging Round API","user":{"login":"kaymation","id":4143010,"node_id":"MDQ6VXNlcjQxNDMwMTA=","avatar_url":"https://avatars1.githubusercontent.com/u/4143010?v=4","gravatar_id":"","url":"https://api.github.com/users/kaymation","html_url":"https://github.com/kaymation","followers_url":"https://api.github.com/users/kaymation/followers","following_url":"https://api.github.com/users/kaymation/following{/other_user}","gists_url":"https://api.github.com/users/kaymation/gists{/gist_id}","starred_url":"https://api.github.com/users/kaymation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaymation/subscriptions","organizations_url":"https://api.github.com/users/kaymation/orgs","repos_url":"https://api.github.com/users/kaymation/repos","events_url":"https://api.github.com/users/kaymation/events{/privacy}","received_events_url":"https://api.github.com/users/kaymation/received_events","type":"User","site_admin":false},"body":"[JIRA](https://masschallenge.atlassian.net/browse/AC-5955)\r\n\r\nIn order to support the Clone Criteria widget, we need the front end to know if a given judging round as any criteria associated with it\r\n\r\n","created_at":"2018-12-20T21:44:26Z","updated_at":"2018-12-20T22:05:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cd90a779bba392303f20c7298250cb5f2a0c24e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/masschallenge/impact-api/pulls/242/commits","review_comments_url":"https://api.github.com/repos/masschallenge/impact-api/pulls/242/comments","review_comment_url":"https://api.github.com/repos/masschallenge/impact-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/masschallenge/impact-api/issues/242/comments","statuses_url":"https://api.github.com/repos/masschallenge/impact-api/statuses/1764732f43b495f302c1c78ffa0a9d64d81986b8","head":{"label":"masschallenge:AC-5955","ref":"AC-5955","sha":"1764732f43b495f302c1c78ffa0a9d64d81986b8","user":{"login":"masschallenge","id":1440552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NDA1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1440552?v=4","gravatar_id":"","url":"https://api.github.com/users/masschallenge","html_url":"https://github.com/masschallenge","followers_url":"https://api.github.com/users/masschallenge/followers","following_url":"https://api.github.com/users/masschallenge/following{/other_user}","gists_url":"https://api.github.com/users/masschallenge/gists{/gist_id}","starred_url":"https://api.github.com/users/masschallenge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masschallenge/subscriptions","organizations_url":"https://api.github.com/users/masschallenge/orgs","repos_url":"https://api.github.com/users/masschallenge/repos","events_url":"https://api.github.com/users/masschallenge/events{/privacy}","received_events_url":"https://api.github.com/users/masschallenge/received_events","type":"Organization","site_admin":false},"repo":{"id":95133025,"node_id":"MDEwOlJlcG9zaXRvcnk5NTEzMzAyNQ==","name":"impact-api","full_name":"masschallenge/impact-api","private":false,"owner":{"login":"masschallenge","id":1440552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NDA1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1440552?v=4","gravatar_id":"","url":"https://api.github.com/users/masschallenge","html_url":"https://github.com/masschallenge","followers_url":"https://api.github.com/users/masschallenge/followers","following_url":"https://api.github.com/users/masschallenge/following{/other_user}","gists_url":"https://api.github.com/users/masschallenge/gists{/gist_id}","starred_url":"https://api.github.com/users/masschallenge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masschallenge/subscriptions","organizations_url":"https://api.github.com/users/masschallenge/orgs","repos_url":"https://api.github.com/users/masschallenge/repos","events_url":"https://api.github.com/users/masschallenge/events{/privacy}","received_events_url":"https://api.github.com/users/masschallenge/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/masschallenge/impact-api","description":"Provides an API for data related to running a startup accelerator.","fork":false,"url":"https://api.github.com/repos/masschallenge/impact-api","forks_url":"https://api.github.com/repos/masschallenge/impact-api/forks","keys_url":"https://api.github.com/repos/masschallenge/impact-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/masschallenge/impact-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/masschallenge/impact-api/teams","hooks_url":"https://api.github.com/repos/masschallenge/impact-api/hooks","issue_events_url":"https://api.github.com/repos/masschallenge/impact-api/issues/events{/number}","events_url":"https://api.github.com/repos/masschallenge/impact-api/events","assignees_url":"https://api.github.com/repos/masschallenge/impact-api/assignees{/user}","branches_url":"https://api.github.com/repos/masschallenge/impact-api/branches{/branch}","tags_url":"https://api.github.com/repos/masschallenge/impact-api/tags","blobs_url":"https://api.github.com/repos/masschallenge/impact-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/masschallenge/impact-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/masschallenge/impact-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/masschallenge/impact-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/masschallenge/impact-api/statuses/{sha}","languages_url":"https://api.github.com/repos/masschallenge/impact-api/languages","stargazers_url":"https://api.github.com/repos/masschallenge/impact-api/stargazers","contributors_url":"https://api.github.com/repos/masschallenge/impact-api/contributors","subscribers_url":"https://api.github.com/repos/masschallenge/impact-api/subscribers","subscription_url":"https://api.github.com/repos/masschallenge/impact-api/subscription","commits_url":"https://api.github.com/repos/masschallenge/impact-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/masschallenge/impact-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/masschallenge/impact-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/masschallenge/impact-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/masschallenge/impact-api/contents/{+path}","compare_url":"https://api.github.com/repos/masschallenge/impact-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/masschallenge/impact-api/merges","archive_url":"https://api.github.com/repos/masschallenge/impact-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/masschallenge/impact-api/downloads","issues_url":"https://api.github.com/repos/masschallenge/impact-api/issues{/number}","pulls_url":"https://api.github.com/repos/masschallenge/impact-api/pulls{/number}","milestones_url":"https://api.github.com/repos/masschallenge/impact-api/milestones{/number}","notifications_url":"https://api.github.com/repos/masschallenge/impact-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/masschallenge/impact-api/labels{/name}","releases_url":"https://api.github.com/repos/masschallenge/impact-api/releases{/id}","deployments_url":"https://api.github.com/repos/masschallenge/impact-api/deployments","created_at":"2017-06-22T16:02:26Z","updated_at":"2018-12-03T15:25:18Z","pushed_at":"2018-12-20T21:44:26Z","git_url":"git://github.com/masschallenge/impact-api.git","ssh_url":"git@github.com:masschallenge/impact-api.git","clone_url":"https://github.com/masschallenge/impact-api.git","svn_url":"https://github.com/masschallenge/impact-api","homepage":"","size":1570,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":3,"default_branch":"development"}},"base":{"label":"masschallenge:development","ref":"development","sha":"0d9755d445bcfc7ba80ccd6931e1b3a349c3ddaf","user":{"login":"masschallenge","id":1440552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NDA1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1440552?v=4","gravatar_id":"","url":"https://api.github.com/users/masschallenge","html_url":"https://github.com/masschallenge","followers_url":"https://api.github.com/users/masschallenge/followers","following_url":"https://api.github.com/users/masschallenge/following{/other_user}","gists_url":"https://api.github.com/users/masschallenge/gists{/gist_id}","starred_url":"https://api.github.com/users/masschallenge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masschallenge/subscriptions","organizations_url":"https://api.github.com/users/masschallenge/orgs","repos_url":"https://api.github.com/users/masschallenge/repos","events_url":"https://api.github.com/users/masschallenge/events{/privacy}","received_events_url":"https://api.github.com/users/masschallenge/received_events","type":"Organization","site_admin":false},"repo":{"id":95133025,"node_id":"MDEwOlJlcG9zaXRvcnk5NTEzMzAyNQ==","name":"impact-api","full_name":"masschallenge/impact-api","private":false,"owner":{"login":"masschallenge","id":1440552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NDA1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1440552?v=4","gravatar_id":"","url":"https://api.github.com/users/masschallenge","html_url":"https://github.com/masschallenge","followers_url":"https://api.github.com/users/masschallenge/followers","following_url":"https://api.github.com/users/masschallenge/following{/other_user}","gists_url":"https://api.github.com/users/masschallenge/gists{/gist_id}","starred_url":"https://api.github.com/users/masschallenge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masschallenge/subscriptions","organizations_url":"https://api.github.com/users/masschallenge/orgs","repos_url":"https://api.github.com/users/masschallenge/repos","events_url":"https://api.github.com/users/masschallenge/events{/privacy}","received_events_url":"https://api.github.com/users/masschallenge/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/masschallenge/impact-api","description":"Provides an API for data related to running a startup accelerator.","fork":false,"url":"https://api.github.com/repos/masschallenge/impact-api","forks_url":"https://api.github.com/repos/masschallenge/impact-api/forks","keys_url":"https://api.github.com/repos/masschallenge/impact-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/masschallenge/impact-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/masschallenge/impact-api/teams","hooks_url":"https://api.github.com/repos/masschallenge/impact-api/hooks","issue_events_url":"https://api.github.com/repos/masschallenge/impact-api/issues/events{/number}","events_url":"https://api.github.com/repos/masschallenge/impact-api/events","assignees_url":"https://api.github.com/repos/masschallenge/impact-api/assignees{/user}","branches_url":"https://api.github.com/repos/masschallenge/impact-api/branches{/branch}","tags_url":"https://api.github.com/repos/masschallenge/impact-api/tags","blobs_url":"https://api.github.com/repos/masschallenge/impact-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/masschallenge/impact-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/masschallenge/impact-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/masschallenge/impact-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/masschallenge/impact-api/statuses/{sha}","languages_url":"https://api.github.com/repos/masschallenge/impact-api/languages","stargazers_url":"https://api.github.com/repos/masschallenge/impact-api/stargazers","contributors_url":"https://api.github.com/repos/masschallenge/impact-api/contributors","subscribers_url":"https://api.github.com/repos/masschallenge/impact-api/subscribers","subscription_url":"https://api.github.com/repos/masschallenge/impact-api/subscription","commits_url":"https://api.github.com/repos/masschallenge/impact-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/masschallenge/impact-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/masschallenge/impact-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/masschallenge/impact-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/masschallenge/impact-api/contents/{+path}","compare_url":"https://api.github.com/repos/masschallenge/impact-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/masschallenge/impact-api/merges","archive_url":"https://api.github.com/repos/masschallenge/impact-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/masschallenge/impact-api/downloads","issues_url":"https://api.github.com/repos/masschallenge/impact-api/issues{/number}","pulls_url":"https://api.github.com/repos/masschallenge/impact-api/pulls{/number}","milestones_url":"https://api.github.com/repos/masschallenge/impact-api/milestones{/number}","notifications_url":"https://api.github.com/repos/masschallenge/impact-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/masschallenge/impact-api/labels{/name}","releases_url":"https://api.github.com/repos/masschallenge/impact-api/releases{/id}","deployments_url":"https://api.github.com/repos/masschallenge/impact-api/deployments","created_at":"2017-06-22T16:02:26Z","updated_at":"2018-12-03T15:25:18Z","pushed_at":"2018-12-20T21:44:26Z","git_url":"git://github.com/masschallenge/impact-api.git","ssh_url":"git@github.com:masschallenge/impact-api.git","clone_url":"https://github.com/masschallenge/impact-api.git","svn_url":"https://github.com/masschallenge/impact-api","homepage":"","size":1570,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":3,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/masschallenge/impact-api/pulls/242"},"html":{"href":"https://github.com/masschallenge/impact-api/pull/242"},"issue":{"href":"https://api.github.com/repos/masschallenge/impact-api/issues/242"},"comments":{"href":"https://api.github.com/repos/masschallenge/impact-api/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/masschallenge/impact-api/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/masschallenge/impact-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/masschallenge/impact-api/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/masschallenge/impact-api/statuses/1764732f43b495f302c1c78ffa0a9d64d81986b8"}},"author_association":"NONE"}}
{"actor":{"display_login":"jonkiparsky"}}