{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/231959686","pull_request_review_id":173048181,"id":231959686,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTk1OTY4Ng==","diff_hunk":"@@ -28,10 +30,18 @@ class RegistrationSchemaList(JSONAPIBaseView, generics.ListAPIView):\n \n     ordering = ('-id',)\n \n-    # overrides ListCreateAPIView\n-    def get_queryset(self):\n-        return RegistrationSchema.objects.filter(schema_version=LATEST_SCHEMA_VERSION, active=True)\n+    def get_default_queryset(self):\n+        if waffle.switch_is_active('filter_schemas_registration_on_active'):\n+            return RegistrationSchema.objects.filter(schema_version=LATEST_SCHEMA_VERSION)\n+        else:\n+            return RegistrationSchema.objects.filter(schema_version=LATEST_SCHEMA_VERSION, active=True)\n \n+    # overrides ListAPIView\n+    def get_queryset(self):","path":"api/schemas/views.py","position":33,"original_position":34,"commit_id":"cbaf0c3a964bd3ad1bf93d986c7d371eb4f5c80b","original_commit_id":"f6679bea197888d352b1370ca89d3ae48bc39bdf","user":{"login":"Johnetordoff","id":9688518,"node_id":"MDQ6VXNlcjk2ODg1MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9688518?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnetordoff","html_url":"https://github.com/Johnetordoff","followers_url":"https://api.github.com/users/Johnetordoff/followers","following_url":"https://api.github.com/users/Johnetordoff/following{/other_user}","gists_url":"https://api.github.com/users/Johnetordoff/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnetordoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnetordoff/subscriptions","organizations_url":"https://api.github.com/users/Johnetordoff/orgs","repos_url":"https://api.github.com/users/Johnetordoff/repos","events_url":"https://api.github.com/users/Johnetordoff/events{/privacy}","received_events_url":"https://api.github.com/users/Johnetordoff/received_events","type":"User","site_admin":false},"body":"When the switch is off, `?filter[active]=false` is ignored and returns only active results, that's the current behavior.","created_at":"2018-11-08T16:22:10Z","updated_at":"2018-11-08T16:22:11Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/8795#discussion_r231959686","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/231959686"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/8795#discussion_r231959686"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795"}},"in_reply_to_id":231655301},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795","id":228792094,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NzkyMDk0","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/8795","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/8795.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/8795.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8795","number":8795,"state":"open","locked":false,"title":"[PLAT-1177] Allow registration schemas to display all by default filter on active","user":{"login":"Johnetordoff","id":9688518,"node_id":"MDQ6VXNlcjk2ODg1MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9688518?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnetordoff","html_url":"https://github.com/Johnetordoff","followers_url":"https://api.github.com/users/Johnetordoff/followers","following_url":"https://api.github.com/users/Johnetordoff/following{/other_user}","gists_url":"https://api.github.com/users/Johnetordoff/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnetordoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnetordoff/subscriptions","organizations_url":"https://api.github.com/users/Johnetordoff/orgs","repos_url":"https://api.github.com/users/Johnetordoff/repos","events_url":"https://api.github.com/users/Johnetordoff/events{/privacy}","received_events_url":"https://api.github.com/users/Johnetordoff/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\nEmbosf wants all the registration schemas and they want them filtered by their active attribute. We're gonna give it to them.\r\n\r\n## Changes\r\n\r\n- Add ListFilterMixin and make active a filterable field\r\n- add test\r\n- add switch\r\n\r\n## QA Notes\r\n\r\nEndpoint `/v2/schemas/registrations/` should have all registration schemas, `/v2/schemas/registrations?filter[active]=True` should return only active schemas.\r\n\r\n❗️ Don't forget the switch!\r\n\r\n## Documentation\r\n\r\nhttps://github.com/CenterForOpenScience/developer.osf.io/pull/31\r\n\r\n## Side Effects\r\n\r\nNone that I know of.\r\n\r\n## Ticket\r\n\r\nhttps://openscience.atlassian.net/browse/PLAT-1177","created_at":"2018-11-06T18:31:13Z","updated_at":"2018-11-08T16:22:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f05ef0baa59cf96bfbb734b3bbb385678c79363","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8795/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/cbaf0c3a964bd3ad1bf93d986c7d371eb4f5c80b","head":{"label":"Johnetordoff:registration-schema-filter-active","ref":"registration-schema-filter-active","sha":"cbaf0c3a964bd3ad1bf93d986c7d371eb4f5c80b","user":{"login":"Johnetordoff","id":9688518,"node_id":"MDQ6VXNlcjk2ODg1MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9688518?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnetordoff","html_url":"https://github.com/Johnetordoff","followers_url":"https://api.github.com/users/Johnetordoff/followers","following_url":"https://api.github.com/users/Johnetordoff/following{/other_user}","gists_url":"https://api.github.com/users/Johnetordoff/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnetordoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnetordoff/subscriptions","organizations_url":"https://api.github.com/users/Johnetordoff/orgs","repos_url":"https://api.github.com/users/Johnetordoff/repos","events_url":"https://api.github.com/users/Johnetordoff/events{/privacy}","received_events_url":"https://api.github.com/users/Johnetordoff/received_events","type":"User","site_admin":false},"repo":{"id":80773184,"node_id":"MDEwOlJlcG9zaXRvcnk4MDc3MzE4NA==","name":"osf.io","full_name":"Johnetordoff/osf.io","private":false,"owner":{"login":"Johnetordoff","id":9688518,"node_id":"MDQ6VXNlcjk2ODg1MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9688518?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnetordoff","html_url":"https://github.com/Johnetordoff","followers_url":"https://api.github.com/users/Johnetordoff/followers","following_url":"https://api.github.com/users/Johnetordoff/following{/other_user}","gists_url":"https://api.github.com/users/Johnetordoff/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnetordoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnetordoff/subscriptions","organizations_url":"https://api.github.com/users/Johnetordoff/orgs","repos_url":"https://api.github.com/users/Johnetordoff/repos","events_url":"https://api.github.com/users/Johnetordoff/events{/privacy}","received_events_url":"https://api.github.com/users/Johnetordoff/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Johnetordoff/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/Johnetordoff/osf.io","forks_url":"https://api.github.com/repos/Johnetordoff/osf.io/forks","keys_url":"https://api.github.com/repos/Johnetordoff/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Johnetordoff/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Johnetordoff/osf.io/teams","hooks_url":"https://api.github.com/repos/Johnetordoff/osf.io/hooks","issue_events_url":"https://api.github.com/repos/Johnetordoff/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/Johnetordoff/osf.io/events","assignees_url":"https://api.github.com/repos/Johnetordoff/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/Johnetordoff/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/Johnetordoff/osf.io/tags","blobs_url":"https://api.github.com/repos/Johnetordoff/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Johnetordoff/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Johnetordoff/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Johnetordoff/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Johnetordoff/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Johnetordoff/osf.io/languages","stargazers_url":"https://api.github.com/repos/Johnetordoff/osf.io/stargazers","contributors_url":"https://api.github.com/repos/Johnetordoff/osf.io/contributors","subscribers_url":"https://api.github.com/repos/Johnetordoff/osf.io/subscribers","subscription_url":"https://api.github.com/repos/Johnetordoff/osf.io/subscription","commits_url":"https://api.github.com/repos/Johnetordoff/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Johnetordoff/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Johnetordoff/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Johnetordoff/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Johnetordoff/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/Johnetordoff/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Johnetordoff/osf.io/merges","archive_url":"https://api.github.com/repos/Johnetordoff/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Johnetordoff/osf.io/downloads","issues_url":"https://api.github.com/repos/Johnetordoff/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/Johnetordoff/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Johnetordoff/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Johnetordoff/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Johnetordoff/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/Johnetordoff/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/Johnetordoff/osf.io/deployments","created_at":"2017-02-02T22:05:12Z","updated_at":"2018-04-29T17:00:28Z","pushed_at":"2018-11-08T15:41:17Z","git_url":"git://github.com/Johnetordoff/osf.io.git","ssh_url":"git@github.com:Johnetordoff/osf.io.git","clone_url":"https://github.com/Johnetordoff/osf.io.git","svn_url":"https://github.com/Johnetordoff/osf.io","homepage":"https://osf.io","size":186853,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"d3901a24eb80eda94202f9bff08df90348102f24","user":{"login":"CenterForOpenScience","id":3344584,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNDQ1ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE5OTU5OQ==","name":"osf.io","full_name":"CenterForOpenScience/osf.io","private":false,"owner":{"login":"CenterForOpenScience","id":3344584,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNDQ1ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/deployments","created_at":"2013-05-21T15:53:37Z","updated_at":"2018-11-08T15:39:28Z","pushed_at":"2018-11-08T15:39:15Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"https://osf.io","size":179565,"stargazers_count":462,"watchers_count":462,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":260,"mirror_url":null,"archived":false,"open_issues_count":223,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":260,"open_issues":223,"watchers":462,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/8795"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8795"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8795/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8795/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/cbaf0c3a964bd3ad1bf93d986c7d371eb4f5c80b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Johnetordoff"}}