{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/74461478","id":74461478,"diff_hunk":"@@ -602,21 +604,33 @@ def create(self, validated_data):\n         contributor.node_id = node._id\n         return contributor\n \n+\n class NodeContributorDetailSerializer(NodeContributorsSerializer):\n     \"\"\"\n     Overrides node contributor serializer to add additional methods\n     \"\"\"\n     id = ContributorIDField(required=True, source='_id')\n+    index = ser.IntegerField(required=False, read_only=False)\n+    # index = ser.IntegerField(required=False)\n \n     def update(self, instance, validated_data):\n+        index = None\n+        if 'index' in validated_data:\n+            index = validated_data.pop('index')","path":"api/nodes/serializers.py","position":32,"original_position":32,"commit_id":"ab8252b25774cd51784c4376e8753178f44081b7","original_commit_id":"ab8252b25774cd51784c4376e8753178f44081b7","user":{"login":"brianjgeiger","id":6599111,"avatar_url":"https://avatars.githubusercontent.com/u/6599111?v=3","gravatar_id":"","url":"https://api.github.com/users/brianjgeiger","html_url":"https://github.com/brianjgeiger","followers_url":"https://api.github.com/users/brianjgeiger/followers","following_url":"https://api.github.com/users/brianjgeiger/following{/other_user}","gists_url":"https://api.github.com/users/brianjgeiger/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjgeiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjgeiger/subscriptions","organizations_url":"https://api.github.com/users/brianjgeiger/orgs","repos_url":"https://api.github.com/users/brianjgeiger/repos","events_url":"https://api.github.com/users/brianjgeiger/events{/privacy}","received_events_url":"https://api.github.com/users/brianjgeiger/received_events","type":"User","site_admin":false},"body":"Yeah, it's not strictly necessary here. Philosophically, it's because it's not a real value on the contributor, so if someone just passed validated_data as kwargs to update the contributor, it could break. As it stands, it's fine, since we aren't doing that.","created_at":"2016-08-11T17:03:21Z","updated_at":"2016-08-11T17:03:21Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6138#discussion_r74461478","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/74461478"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/6138#discussion_r74461478"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138","id":80865624,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6138","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/6138.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/6138.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6138","number":6138,"state":"open","locked":false,"title":"Feature/api reorder contributors","user":{"login":"brianjgeiger","id":6599111,"avatar_url":"https://avatars.githubusercontent.com/u/6599111?v=3","gravatar_id":"","url":"https://api.github.com/users/brianjgeiger","html_url":"https://github.com/brianjgeiger","followers_url":"https://api.github.com/users/brianjgeiger/followers","following_url":"https://api.github.com/users/brianjgeiger/following{/other_user}","gists_url":"https://api.github.com/users/brianjgeiger/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjgeiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjgeiger/subscriptions","organizations_url":"https://api.github.com/users/brianjgeiger/orgs","repos_url":"https://api.github.com/users/brianjgeiger/repos","events_url":"https://api.github.com/users/brianjgeiger/events{/privacy}","received_events_url":"https://api.github.com/users/brianjgeiger/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\nAllow API v2 consumers to re-order contributors.\r\n \r\n## Changes\r\n\r\n1. Tests\r\n2. Add a method on the node model to do single-contributor moves\r\n3. Modify the API so that it can accept a re-order request and pass that along to the node.\r\n\r\n## Side effects\r\n\r\nShould be fairly isolated.\r\n\r\n\r\n## Ticket\r\n\r\nhttps://openscience.atlassian.net/browse/OSF-6832","created_at":"2016-08-10T20:53:21Z","updated_at":"2016-08-11T17:03:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab1c75d08afc9da54df4402dea6210b2cea33aaa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138/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/6138/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/ab8252b25774cd51784c4376e8753178f44081b7","head":{"label":"brianjgeiger:feature/api-reorder-contributors","ref":"feature/api-reorder-contributors","sha":"ab8252b25774cd51784c4376e8753178f44081b7","user":{"login":"brianjgeiger","id":6599111,"avatar_url":"https://avatars.githubusercontent.com/u/6599111?v=3","gravatar_id":"","url":"https://api.github.com/users/brianjgeiger","html_url":"https://github.com/brianjgeiger","followers_url":"https://api.github.com/users/brianjgeiger/followers","following_url":"https://api.github.com/users/brianjgeiger/following{/other_user}","gists_url":"https://api.github.com/users/brianjgeiger/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjgeiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjgeiger/subscriptions","organizations_url":"https://api.github.com/users/brianjgeiger/orgs","repos_url":"https://api.github.com/users/brianjgeiger/repos","events_url":"https://api.github.com/users/brianjgeiger/events{/privacy}","received_events_url":"https://api.github.com/users/brianjgeiger/received_events","type":"User","site_admin":false},"repo":{"id":26919852,"name":"osf.io","full_name":"brianjgeiger/osf.io","owner":{"login":"brianjgeiger","id":6599111,"avatar_url":"https://avatars.githubusercontent.com/u/6599111?v=3","gravatar_id":"","url":"https://api.github.com/users/brianjgeiger","html_url":"https://github.com/brianjgeiger","followers_url":"https://api.github.com/users/brianjgeiger/followers","following_url":"https://api.github.com/users/brianjgeiger/following{/other_user}","gists_url":"https://api.github.com/users/brianjgeiger/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjgeiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjgeiger/subscriptions","organizations_url":"https://api.github.com/users/brianjgeiger/orgs","repos_url":"https://api.github.com/users/brianjgeiger/repos","events_url":"https://api.github.com/users/brianjgeiger/events{/privacy}","received_events_url":"https://api.github.com/users/brianjgeiger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianjgeiger/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/brianjgeiger/osf.io","forks_url":"https://api.github.com/repos/brianjgeiger/osf.io/forks","keys_url":"https://api.github.com/repos/brianjgeiger/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianjgeiger/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianjgeiger/osf.io/teams","hooks_url":"https://api.github.com/repos/brianjgeiger/osf.io/hooks","issue_events_url":"https://api.github.com/repos/brianjgeiger/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/brianjgeiger/osf.io/events","assignees_url":"https://api.github.com/repos/brianjgeiger/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/brianjgeiger/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/brianjgeiger/osf.io/tags","blobs_url":"https://api.github.com/repos/brianjgeiger/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianjgeiger/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianjgeiger/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianjgeiger/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianjgeiger/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/brianjgeiger/osf.io/languages","stargazers_url":"https://api.github.com/repos/brianjgeiger/osf.io/stargazers","contributors_url":"https://api.github.com/repos/brianjgeiger/osf.io/contributors","subscribers_url":"https://api.github.com/repos/brianjgeiger/osf.io/subscribers","subscription_url":"https://api.github.com/repos/brianjgeiger/osf.io/subscription","commits_url":"https://api.github.com/repos/brianjgeiger/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianjgeiger/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianjgeiger/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianjgeiger/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianjgeiger/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/brianjgeiger/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianjgeiger/osf.io/merges","archive_url":"https://api.github.com/repos/brianjgeiger/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianjgeiger/osf.io/downloads","issues_url":"https://api.github.com/repos/brianjgeiger/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/brianjgeiger/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/brianjgeiger/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/brianjgeiger/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianjgeiger/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/brianjgeiger/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/brianjgeiger/osf.io/deployments","created_at":"2014-11-20T15:59:16Z","updated_at":"2016-05-19T20:32:01Z","pushed_at":"2016-08-10T19:30:35Z","git_url":"git://github.com/brianjgeiger/osf.io.git","ssh_url":"git@github.com:brianjgeiger/osf.io.git","clone_url":"https://github.com/brianjgeiger/osf.io.git","svn_url":"https://github.com/brianjgeiger/osf.io","homepage":"http://osf.io","size":131704,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"f354f12d89db2be1639ada198134e06e862a851b","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","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,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","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},"private":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":"2016-08-09T09:39:08Z","pushed_at":"2016-08-11T17:02:13Z","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":"http://osf.io","size":265600,"stargazers_count":247,"watchers_count":247,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":196,"mirror_url":null,"open_issues_count":204,"forks":196,"open_issues":204,"watchers":247,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/6138"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6138"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6138/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6138/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/6138/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/ab8252b25774cd51784c4376e8753178f44081b7"}}}}
{"actor":{"display_login":"brianjgeiger"}}