{"action":"created","comment":{"url":"https://api.github.com/repos/gitcoinco/web/pulls/comments/237529576","pull_request_review_id":179849238,"id":237529576,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzUyOTU3Ng==","diff_hunk":"@@ -276,6 +276,17 @@ def grant_fund(request, grant_id,  grant_slug):\n         }\n         return TemplateResponse(request, 'grants/shared/error.html', params)\n \n+    active_subscription = Subscription.objects.select_related('grant').filter(grant=grant_id, active=True, contributor_profile=request.user.profile).count()","path":"app/grants/views.py","position":4,"original_position":4,"commit_id":"2f36c68f1c9ec3c56e7fab4659ed59c35fa80a2c","original_commit_id":"2f36c68f1c9ec3c56e7fab4659ed59c35fa80a2c","user":{"login":"mbeacom","id":7315957,"node_id":"MDQ6VXNlcjczMTU5NTc=","avatar_url":"https://avatars0.githubusercontent.com/u/7315957?v=4","gravatar_id":"","url":"https://api.github.com/users/mbeacom","html_url":"https://github.com/mbeacom","followers_url":"https://api.github.com/users/mbeacom/followers","following_url":"https://api.github.com/users/mbeacom/following{/other_user}","gists_url":"https://api.github.com/users/mbeacom/gists{/gist_id}","starred_url":"https://api.github.com/users/mbeacom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbeacom/subscriptions","organizations_url":"https://api.github.com/users/mbeacom/orgs","repos_url":"https://api.github.com/users/mbeacom/repos","events_url":"https://api.github.com/users/mbeacom/events{/privacy}","received_events_url":"https://api.github.com/users/mbeacom/received_events","type":"User","site_admin":false},"body":"Can you adjust this for line length?\r\n\r\nAlso, you can eliminate the `.count()` call and simply `.filter()`","created_at":"2018-11-29T15:20:26Z","updated_at":"2018-11-29T15:21:00Z","html_url":"https://github.com/gitcoinco/web/pull/3001#discussion_r237529576","pull_request_url":"https://api.github.com/repos/gitcoinco/web/pulls/3001","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/comments/237529576"},"html":{"href":"https://github.com/gitcoinco/web/pull/3001#discussion_r237529576"},"pull_request":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/3001"}},"in_reply_to_id":237528631},"pull_request":{"url":"https://api.github.com/repos/gitcoinco/web/pulls/3001","id":234675851,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0Njc1ODUx","html_url":"https://github.com/gitcoinco/web/pull/3001","diff_url":"https://github.com/gitcoinco/web/pull/3001.diff","patch_url":"https://github.com/gitcoinco/web/pull/3001.patch","issue_url":"https://api.github.com/repos/gitcoinco/web/issues/3001","number":3001,"state":"open","locked":false,"title":"user can contribute only once per grant","user":{"login":"thelostone-mc","id":5358146,"node_id":"MDQ6VXNlcjUzNTgxNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/5358146?v=4","gravatar_id":"","url":"https://api.github.com/users/thelostone-mc","html_url":"https://github.com/thelostone-mc","followers_url":"https://api.github.com/users/thelostone-mc/followers","following_url":"https://api.github.com/users/thelostone-mc/following{/other_user}","gists_url":"https://api.github.com/users/thelostone-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/thelostone-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelostone-mc/subscriptions","organizations_url":"https://api.github.com/users/thelostone-mc/orgs","repos_url":"https://api.github.com/users/thelostone-mc/repos","events_url":"https://api.github.com/users/thelostone-mc/events{/privacy}","received_events_url":"https://api.github.com/users/thelostone-mc/received_events","type":"User","site_admin":false},"body":"##### Description\r\n\r\nEnsures user can contribute to a fund only if has no active contribution for the grant\r\n\r\n![untitled](https://user-images.githubusercontent.com/5358146/49231549-31ff2f80-f418-11e8-8535-dd38f29f8dbd.gif)\r\n\r\n\r\n##### Checklist\r\n\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] linter status: 100% pass\r\n- [x] changes don't break existing behavior\r\n- [x] commit message follows [commit guidelines](https://docs.gitcoin.co/mk_contributors/#step-4-commit)\r\n\r\n##### Affected core subsystem(s)\r\n\r\n<!-- Provide affected core subsystem(s) (like doc, ui, crypto, etc). -->\r\n\r\n##### Testing\r\n\r\n<!-- Why should the PR reviewer trust that this change doesn't break anything? How have you tested this change? -->\r\n\r\n##### Refers/Fixes\r\n\r\n<!--\r\n  Link to an issue if applicable. For example:\r\n  If your PR fixes an issue  -> Fixes: #102\r\n  If your PR refers an issue -> Refs: #101\r\n-->\r\n","created_at":"2018-11-29T15:18:02Z","updated_at":"2018-11-29T15:21:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28187c6118ed9ba39a533fc59a14bcf973639b5f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":820451824,"node_id":"MDU6TGFiZWw4MjA0NTE4MjQ=","url":"https://api.github.com/repos/gitcoinco/web/labels/in%20progress","name":"in progress","color":"4abc40","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gitcoinco/web/pulls/3001/commits","review_comments_url":"https://api.github.com/repos/gitcoinco/web/pulls/3001/comments","review_comment_url":"https://api.github.com/repos/gitcoinco/web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gitcoinco/web/issues/3001/comments","statuses_url":"https://api.github.com/repos/gitcoinco/web/statuses/2f36c68f1c9ec3c56e7fab4659ed59c35fa80a2c","head":{"label":"thelostone-mc:grantz","ref":"grantz","sha":"2f36c68f1c9ec3c56e7fab4659ed59c35fa80a2c","user":{"login":"thelostone-mc","id":5358146,"node_id":"MDQ6VXNlcjUzNTgxNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/5358146?v=4","gravatar_id":"","url":"https://api.github.com/users/thelostone-mc","html_url":"https://github.com/thelostone-mc","followers_url":"https://api.github.com/users/thelostone-mc/followers","following_url":"https://api.github.com/users/thelostone-mc/following{/other_user}","gists_url":"https://api.github.com/users/thelostone-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/thelostone-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelostone-mc/subscriptions","organizations_url":"https://api.github.com/users/thelostone-mc/orgs","repos_url":"https://api.github.com/users/thelostone-mc/repos","events_url":"https://api.github.com/users/thelostone-mc/events{/privacy}","received_events_url":"https://api.github.com/users/thelostone-mc/received_events","type":"User","site_admin":false},"repo":{"id":112568212,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI1NjgyMTI=","name":"web","full_name":"thelostone-mc/web","private":false,"owner":{"login":"thelostone-mc","id":5358146,"node_id":"MDQ6VXNlcjUzNTgxNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/5358146?v=4","gravatar_id":"","url":"https://api.github.com/users/thelostone-mc","html_url":"https://github.com/thelostone-mc","followers_url":"https://api.github.com/users/thelostone-mc/followers","following_url":"https://api.github.com/users/thelostone-mc/following{/other_user}","gists_url":"https://api.github.com/users/thelostone-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/thelostone-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelostone-mc/subscriptions","organizations_url":"https://api.github.com/users/thelostone-mc/orgs","repos_url":"https://api.github.com/users/thelostone-mc/repos","events_url":"https://api.github.com/users/thelostone-mc/events{/privacy}","received_events_url":"https://api.github.com/users/thelostone-mc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/thelostone-mc/web","description":"Push Open Source Forward.","fork":true,"url":"https://api.github.com/repos/thelostone-mc/web","forks_url":"https://api.github.com/repos/thelostone-mc/web/forks","keys_url":"https://api.github.com/repos/thelostone-mc/web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thelostone-mc/web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thelostone-mc/web/teams","hooks_url":"https://api.github.com/repos/thelostone-mc/web/hooks","issue_events_url":"https://api.github.com/repos/thelostone-mc/web/issues/events{/number}","events_url":"https://api.github.com/repos/thelostone-mc/web/events","assignees_url":"https://api.github.com/repos/thelostone-mc/web/assignees{/user}","branches_url":"https://api.github.com/repos/thelostone-mc/web/branches{/branch}","tags_url":"https://api.github.com/repos/thelostone-mc/web/tags","blobs_url":"https://api.github.com/repos/thelostone-mc/web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thelostone-mc/web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thelostone-mc/web/git/refs{/sha}","trees_url":"https://api.github.com/repos/thelostone-mc/web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thelostone-mc/web/statuses/{sha}","languages_url":"https://api.github.com/repos/thelostone-mc/web/languages","stargazers_url":"https://api.github.com/repos/thelostone-mc/web/stargazers","contributors_url":"https://api.github.com/repos/thelostone-mc/web/contributors","subscribers_url":"https://api.github.com/repos/thelostone-mc/web/subscribers","subscription_url":"https://api.github.com/repos/thelostone-mc/web/subscription","commits_url":"https://api.github.com/repos/thelostone-mc/web/commits{/sha}","git_commits_url":"https://api.github.com/repos/thelostone-mc/web/git/commits{/sha}","comments_url":"https://api.github.com/repos/thelostone-mc/web/comments{/number}","issue_comment_url":"https://api.github.com/repos/thelostone-mc/web/issues/comments{/number}","contents_url":"https://api.github.com/repos/thelostone-mc/web/contents/{+path}","compare_url":"https://api.github.com/repos/thelostone-mc/web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thelostone-mc/web/merges","archive_url":"https://api.github.com/repos/thelostone-mc/web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thelostone-mc/web/downloads","issues_url":"https://api.github.com/repos/thelostone-mc/web/issues{/number}","pulls_url":"https://api.github.com/repos/thelostone-mc/web/pulls{/number}","milestones_url":"https://api.github.com/repos/thelostone-mc/web/milestones{/number}","notifications_url":"https://api.github.com/repos/thelostone-mc/web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thelostone-mc/web/labels{/name}","releases_url":"https://api.github.com/repos/thelostone-mc/web/releases{/id}","deployments_url":"https://api.github.com/repos/thelostone-mc/web/deployments","created_at":"2017-11-30T05:22:19Z","updated_at":"2018-10-10T07:46:20Z","pushed_at":"2018-11-29T15:16:16Z","git_url":"git://github.com/thelostone-mc/web.git","ssh_url":"git@github.com:thelostone-mc/web.git","clone_url":"https://github.com/thelostone-mc/web.git","svn_url":"https://github.com/thelostone-mc/web","homepage":"https://gitcoin.co","size":225674,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gitcoinco:grantz","ref":"grantz","sha":"9d3294d9f2b856d3c7ea0ceca24f095c8cb20807","user":{"login":"gitcoinco","id":30044474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMDQ0NDc0","avatar_url":"https://avatars1.githubusercontent.com/u/30044474?v=4","gravatar_id":"","url":"https://api.github.com/users/gitcoinco","html_url":"https://github.com/gitcoinco","followers_url":"https://api.github.com/users/gitcoinco/followers","following_url":"https://api.github.com/users/gitcoinco/following{/other_user}","gists_url":"https://api.github.com/users/gitcoinco/gists{/gist_id}","starred_url":"https://api.github.com/users/gitcoinco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitcoinco/subscriptions","organizations_url":"https://api.github.com/users/gitcoinco/orgs","repos_url":"https://api.github.com/users/gitcoinco/repos","events_url":"https://api.github.com/users/gitcoinco/events{/privacy}","received_events_url":"https://api.github.com/users/gitcoinco/received_events","type":"Organization","site_admin":false},"repo":{"id":96767206,"node_id":"MDEwOlJlcG9zaXRvcnk5Njc2NzIwNg==","name":"web","full_name":"gitcoinco/web","private":false,"owner":{"login":"gitcoinco","id":30044474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMDQ0NDc0","avatar_url":"https://avatars1.githubusercontent.com/u/30044474?v=4","gravatar_id":"","url":"https://api.github.com/users/gitcoinco","html_url":"https://github.com/gitcoinco","followers_url":"https://api.github.com/users/gitcoinco/followers","following_url":"https://api.github.com/users/gitcoinco/following{/other_user}","gists_url":"https://api.github.com/users/gitcoinco/gists{/gist_id}","starred_url":"https://api.github.com/users/gitcoinco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitcoinco/subscriptions","organizations_url":"https://api.github.com/users/gitcoinco/orgs","repos_url":"https://api.github.com/users/gitcoinco/repos","events_url":"https://api.github.com/users/gitcoinco/events{/privacy}","received_events_url":"https://api.github.com/users/gitcoinco/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gitcoinco/web","description":"Grow Open Source","fork":false,"url":"https://api.github.com/repos/gitcoinco/web","forks_url":"https://api.github.com/repos/gitcoinco/web/forks","keys_url":"https://api.github.com/repos/gitcoinco/web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitcoinco/web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitcoinco/web/teams","hooks_url":"https://api.github.com/repos/gitcoinco/web/hooks","issue_events_url":"https://api.github.com/repos/gitcoinco/web/issues/events{/number}","events_url":"https://api.github.com/repos/gitcoinco/web/events","assignees_url":"https://api.github.com/repos/gitcoinco/web/assignees{/user}","branches_url":"https://api.github.com/repos/gitcoinco/web/branches{/branch}","tags_url":"https://api.github.com/repos/gitcoinco/web/tags","blobs_url":"https://api.github.com/repos/gitcoinco/web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitcoinco/web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitcoinco/web/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitcoinco/web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitcoinco/web/statuses/{sha}","languages_url":"https://api.github.com/repos/gitcoinco/web/languages","stargazers_url":"https://api.github.com/repos/gitcoinco/web/stargazers","contributors_url":"https://api.github.com/repos/gitcoinco/web/contributors","subscribers_url":"https://api.github.com/repos/gitcoinco/web/subscribers","subscription_url":"https://api.github.com/repos/gitcoinco/web/subscription","commits_url":"https://api.github.com/repos/gitcoinco/web/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitcoinco/web/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitcoinco/web/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitcoinco/web/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitcoinco/web/contents/{+path}","compare_url":"https://api.github.com/repos/gitcoinco/web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitcoinco/web/merges","archive_url":"https://api.github.com/repos/gitcoinco/web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitcoinco/web/downloads","issues_url":"https://api.github.com/repos/gitcoinco/web/issues{/number}","pulls_url":"https://api.github.com/repos/gitcoinco/web/pulls{/number}","milestones_url":"https://api.github.com/repos/gitcoinco/web/milestones{/number}","notifications_url":"https://api.github.com/repos/gitcoinco/web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitcoinco/web/labels{/name}","releases_url":"https://api.github.com/repos/gitcoinco/web/releases{/id}","deployments_url":"https://api.github.com/repos/gitcoinco/web/deployments","created_at":"2017-07-10T10:53:45Z","updated_at":"2018-11-29T02:01:11Z","pushed_at":"2018-11-29T15:18:03Z","git_url":"git://github.com/gitcoinco/web.git","ssh_url":"git@github.com:gitcoinco/web.git","clone_url":"https://github.com/gitcoinco/web.git","svn_url":"https://github.com/gitcoinco/web","homepage":"https://gitcoin.co","size":325940,"stargazers_count":566,"watchers_count":566,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":331,"mirror_url":null,"archived":false,"open_issues_count":760,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":331,"open_issues":760,"watchers":566,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/3001"},"html":{"href":"https://github.com/gitcoinco/web/pull/3001"},"issue":{"href":"https://api.github.com/repos/gitcoinco/web/issues/3001"},"comments":{"href":"https://api.github.com/repos/gitcoinco/web/issues/3001/comments"},"review_comments":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/3001/comments"},"review_comment":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/3001/commits"},"statuses":{"href":"https://api.github.com/repos/gitcoinco/web/statuses/2f36c68f1c9ec3c56e7fab4659ed59c35fa80a2c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mbeacom"}}