{"action":"created","comment":{"url":"https://api.github.com/repos/unicef/etools/pulls/comments/74447080","id":74447080,"diff_hunk":"@@ -52,6 +61,14 @@ class SectorViewSet(mixins.RetrieveModelMixin,\n #     serializer_class = GoalCreateSerializer\n \n \n+class MilestoneViewSet(viewsets.ModelViewSet):\n+    \"\"\"\n+    CRUD api for Milestones\n+    \"\"\"\n+    queryset = Milestone.objects.all()\n+    serializer_class = MilestoneSerializer","path":"EquiTrack/reports/views.py","position":32,"original_position":31,"commit_id":"032e3d49f7142999db8c3ce66753cca2137054b0","original_commit_id":"7d5065da9a1b4e76bed642e8b8bfa43cc272bc07","user":{"login":"ilcsik","id":1902836,"avatar_url":"https://avatars.githubusercontent.com/u/1902836?v=3","gravatar_id":"","url":"https://api.github.com/users/ilcsik","html_url":"https://github.com/ilcsik","followers_url":"https://api.github.com/users/ilcsik/followers","following_url":"https://api.github.com/users/ilcsik/following{/other_user}","gists_url":"https://api.github.com/users/ilcsik/gists{/gist_id}","starred_url":"https://api.github.com/users/ilcsik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilcsik/subscriptions","organizations_url":"https://api.github.com/users/ilcsik/orgs","repos_url":"https://api.github.com/users/ilcsik/repos","events_url":"https://api.github.com/users/ilcsik/events{/privacy}","received_events_url":"https://api.github.com/users/ilcsik/received_events","type":"User","site_admin":false},"body":"Added to ResultViewSet as well, done in https://github.com/unicef/etools/pull/80/commits/032e3d49f7142999db8c3ce66753cca2137054b0","created_at":"2016-08-11T15:41:35Z","updated_at":"2016-08-11T15:41:35Z","html_url":"https://github.com/unicef/etools/pull/80#discussion_r74447080","pull_request_url":"https://api.github.com/repos/unicef/etools/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/unicef/etools/pulls/comments/74447080"},"html":{"href":"https://github.com/unicef/etools/pull/80#discussion_r74447080"},"pull_request":{"href":"https://api.github.com/repos/unicef/etools/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/unicef/etools/pulls/80","id":80776146,"html_url":"https://github.com/unicef/etools/pull/80","diff_url":"https://github.com/unicef/etools/pull/80.diff","patch_url":"https://github.com/unicef/etools/pull/80.patch","issue_url":"https://api.github.com/repos/unicef/etools/issues/80","number":80,"state":"open","locked":false,"title":"Feature results api [WIP]","user":{"login":"ilcsik","id":1902836,"avatar_url":"https://avatars.githubusercontent.com/u/1902836?v=3","gravatar_id":"","url":"https://api.github.com/users/ilcsik","html_url":"https://github.com/ilcsik","followers_url":"https://api.github.com/users/ilcsik/followers","following_url":"https://api.github.com/users/ilcsik/following{/other_user}","gists_url":"https://api.github.com/users/ilcsik/gists{/gist_id}","starred_url":"https://api.github.com/users/ilcsik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilcsik/subscriptions","organizations_url":"https://api.github.com/users/ilcsik/orgs","repos_url":"https://api.github.com/users/ilcsik/repos","events_url":"https://api.github.com/users/ilcsik/events{/privacy}","received_events_url":"https://api.github.com/users/ilcsik/received_events","type":"User","site_admin":false},"body":"@robertavram can you please review? \r\n\r\nYou were right regarding M2M fields, in case of existing related objects, there's no need for custom  create/update method, a simple` PrimaryKeyRelatedField() `with `many=True` will do the trick when updating using existing IDs.\r\n\r\nI'm going to add some tests so it's WIP.","created_at":"2016-08-10T11:15:05Z","updated_at":"2016-08-11T15:41:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad8e79e261fcd31d7be45847d223339e3fe7ac00","assignee":{"login":"robertavram","id":5633041,"avatar_url":"https://avatars.githubusercontent.com/u/5633041?v=3","gravatar_id":"","url":"https://api.github.com/users/robertavram","html_url":"https://github.com/robertavram","followers_url":"https://api.github.com/users/robertavram/followers","following_url":"https://api.github.com/users/robertavram/following{/other_user}","gists_url":"https://api.github.com/users/robertavram/gists{/gist_id}","starred_url":"https://api.github.com/users/robertavram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertavram/subscriptions","organizations_url":"https://api.github.com/users/robertavram/orgs","repos_url":"https://api.github.com/users/robertavram/repos","events_url":"https://api.github.com/users/robertavram/events{/privacy}","received_events_url":"https://api.github.com/users/robertavram/received_events","type":"User","site_admin":false},"assignees":[{"login":"robertavram","id":5633041,"avatar_url":"https://avatars.githubusercontent.com/u/5633041?v=3","gravatar_id":"","url":"https://api.github.com/users/robertavram","html_url":"https://github.com/robertavram","followers_url":"https://api.github.com/users/robertavram/followers","following_url":"https://api.github.com/users/robertavram/following{/other_user}","gists_url":"https://api.github.com/users/robertavram/gists{/gist_id}","starred_url":"https://api.github.com/users/robertavram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertavram/subscriptions","organizations_url":"https://api.github.com/users/robertavram/orgs","repos_url":"https://api.github.com/users/robertavram/repos","events_url":"https://api.github.com/users/robertavram/events{/privacy}","received_events_url":"https://api.github.com/users/robertavram/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/unicef/etools/pulls/80/commits","review_comments_url":"https://api.github.com/repos/unicef/etools/pulls/80/comments","review_comment_url":"https://api.github.com/repos/unicef/etools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unicef/etools/issues/80/comments","statuses_url":"https://api.github.com/repos/unicef/etools/statuses/032e3d49f7142999db8c3ce66753cca2137054b0","head":{"label":"unicef:feature-results-api","ref":"feature-results-api","sha":"032e3d49f7142999db8c3ce66753cca2137054b0","user":{"login":"unicef","id":175849,"avatar_url":"https://avatars.githubusercontent.com/u/175849?v=3","gravatar_id":"","url":"https://api.github.com/users/unicef","html_url":"https://github.com/unicef","followers_url":"https://api.github.com/users/unicef/followers","following_url":"https://api.github.com/users/unicef/following{/other_user}","gists_url":"https://api.github.com/users/unicef/gists{/gist_id}","starred_url":"https://api.github.com/users/unicef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unicef/subscriptions","organizations_url":"https://api.github.com/users/unicef/orgs","repos_url":"https://api.github.com/users/unicef/repos","events_url":"https://api.github.com/users/unicef/events{/privacy}","received_events_url":"https://api.github.com/users/unicef/received_events","type":"Organization","site_admin":false},"repo":{"id":54648215,"name":"etools","full_name":"unicef/etools","owner":{"login":"unicef","id":175849,"avatar_url":"https://avatars.githubusercontent.com/u/175849?v=3","gravatar_id":"","url":"https://api.github.com/users/unicef","html_url":"https://github.com/unicef","followers_url":"https://api.github.com/users/unicef/followers","following_url":"https://api.github.com/users/unicef/following{/other_user}","gists_url":"https://api.github.com/users/unicef/gists{/gist_id}","starred_url":"https://api.github.com/users/unicef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unicef/subscriptions","organizations_url":"https://api.github.com/users/unicef/orgs","repos_url":"https://api.github.com/users/unicef/repos","events_url":"https://api.github.com/users/unicef/events{/privacy}","received_events_url":"https://api.github.com/users/unicef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unicef/etools","description":"","fork":false,"url":"https://api.github.com/repos/unicef/etools","forks_url":"https://api.github.com/repos/unicef/etools/forks","keys_url":"https://api.github.com/repos/unicef/etools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unicef/etools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unicef/etools/teams","hooks_url":"https://api.github.com/repos/unicef/etools/hooks","issue_events_url":"https://api.github.com/repos/unicef/etools/issues/events{/number}","events_url":"https://api.github.com/repos/unicef/etools/events","assignees_url":"https://api.github.com/repos/unicef/etools/assignees{/user}","branches_url":"https://api.github.com/repos/unicef/etools/branches{/branch}","tags_url":"https://api.github.com/repos/unicef/etools/tags","blobs_url":"https://api.github.com/repos/unicef/etools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unicef/etools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unicef/etools/git/refs{/sha}","trees_url":"https://api.github.com/repos/unicef/etools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unicef/etools/statuses/{sha}","languages_url":"https://api.github.com/repos/unicef/etools/languages","stargazers_url":"https://api.github.com/repos/unicef/etools/stargazers","contributors_url":"https://api.github.com/repos/unicef/etools/contributors","subscribers_url":"https://api.github.com/repos/unicef/etools/subscribers","subscription_url":"https://api.github.com/repos/unicef/etools/subscription","commits_url":"https://api.github.com/repos/unicef/etools/commits{/sha}","git_commits_url":"https://api.github.com/repos/unicef/etools/git/commits{/sha}","comments_url":"https://api.github.com/repos/unicef/etools/comments{/number}","issue_comment_url":"https://api.github.com/repos/unicef/etools/issues/comments{/number}","contents_url":"https://api.github.com/repos/unicef/etools/contents/{+path}","compare_url":"https://api.github.com/repos/unicef/etools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unicef/etools/merges","archive_url":"https://api.github.com/repos/unicef/etools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unicef/etools/downloads","issues_url":"https://api.github.com/repos/unicef/etools/issues{/number}","pulls_url":"https://api.github.com/repos/unicef/etools/pulls{/number}","milestones_url":"https://api.github.com/repos/unicef/etools/milestones{/number}","notifications_url":"https://api.github.com/repos/unicef/etools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unicef/etools/labels{/name}","releases_url":"https://api.github.com/repos/unicef/etools/releases{/id}","deployments_url":"https://api.github.com/repos/unicef/etools/deployments","created_at":"2016-03-24T14:28:49Z","updated_at":"2016-07-22T16:14:03Z","pushed_at":"2016-08-11T15:41:07Z","git_url":"git://github.com/unicef/etools.git","ssh_url":"git@github.com:unicef/etools.git","clone_url":"https://github.com/unicef/etools.git","svn_url":"https://github.com/unicef/etools","homepage":null,"size":65538,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":3,"default_branch":"master"}},"base":{"label":"unicef:master","ref":"master","sha":"6956fa70db4884831a4377e9e780dcc401a42566","user":{"login":"unicef","id":175849,"avatar_url":"https://avatars.githubusercontent.com/u/175849?v=3","gravatar_id":"","url":"https://api.github.com/users/unicef","html_url":"https://github.com/unicef","followers_url":"https://api.github.com/users/unicef/followers","following_url":"https://api.github.com/users/unicef/following{/other_user}","gists_url":"https://api.github.com/users/unicef/gists{/gist_id}","starred_url":"https://api.github.com/users/unicef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unicef/subscriptions","organizations_url":"https://api.github.com/users/unicef/orgs","repos_url":"https://api.github.com/users/unicef/repos","events_url":"https://api.github.com/users/unicef/events{/privacy}","received_events_url":"https://api.github.com/users/unicef/received_events","type":"Organization","site_admin":false},"repo":{"id":54648215,"name":"etools","full_name":"unicef/etools","owner":{"login":"unicef","id":175849,"avatar_url":"https://avatars.githubusercontent.com/u/175849?v=3","gravatar_id":"","url":"https://api.github.com/users/unicef","html_url":"https://github.com/unicef","followers_url":"https://api.github.com/users/unicef/followers","following_url":"https://api.github.com/users/unicef/following{/other_user}","gists_url":"https://api.github.com/users/unicef/gists{/gist_id}","starred_url":"https://api.github.com/users/unicef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unicef/subscriptions","organizations_url":"https://api.github.com/users/unicef/orgs","repos_url":"https://api.github.com/users/unicef/repos","events_url":"https://api.github.com/users/unicef/events{/privacy}","received_events_url":"https://api.github.com/users/unicef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unicef/etools","description":"","fork":false,"url":"https://api.github.com/repos/unicef/etools","forks_url":"https://api.github.com/repos/unicef/etools/forks","keys_url":"https://api.github.com/repos/unicef/etools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unicef/etools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unicef/etools/teams","hooks_url":"https://api.github.com/repos/unicef/etools/hooks","issue_events_url":"https://api.github.com/repos/unicef/etools/issues/events{/number}","events_url":"https://api.github.com/repos/unicef/etools/events","assignees_url":"https://api.github.com/repos/unicef/etools/assignees{/user}","branches_url":"https://api.github.com/repos/unicef/etools/branches{/branch}","tags_url":"https://api.github.com/repos/unicef/etools/tags","blobs_url":"https://api.github.com/repos/unicef/etools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unicef/etools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unicef/etools/git/refs{/sha}","trees_url":"https://api.github.com/repos/unicef/etools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unicef/etools/statuses/{sha}","languages_url":"https://api.github.com/repos/unicef/etools/languages","stargazers_url":"https://api.github.com/repos/unicef/etools/stargazers","contributors_url":"https://api.github.com/repos/unicef/etools/contributors","subscribers_url":"https://api.github.com/repos/unicef/etools/subscribers","subscription_url":"https://api.github.com/repos/unicef/etools/subscription","commits_url":"https://api.github.com/repos/unicef/etools/commits{/sha}","git_commits_url":"https://api.github.com/repos/unicef/etools/git/commits{/sha}","comments_url":"https://api.github.com/repos/unicef/etools/comments{/number}","issue_comment_url":"https://api.github.com/repos/unicef/etools/issues/comments{/number}","contents_url":"https://api.github.com/repos/unicef/etools/contents/{+path}","compare_url":"https://api.github.com/repos/unicef/etools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unicef/etools/merges","archive_url":"https://api.github.com/repos/unicef/etools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unicef/etools/downloads","issues_url":"https://api.github.com/repos/unicef/etools/issues{/number}","pulls_url":"https://api.github.com/repos/unicef/etools/pulls{/number}","milestones_url":"https://api.github.com/repos/unicef/etools/milestones{/number}","notifications_url":"https://api.github.com/repos/unicef/etools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unicef/etools/labels{/name}","releases_url":"https://api.github.com/repos/unicef/etools/releases{/id}","deployments_url":"https://api.github.com/repos/unicef/etools/deployments","created_at":"2016-03-24T14:28:49Z","updated_at":"2016-07-22T16:14:03Z","pushed_at":"2016-08-11T15:41:07Z","git_url":"git://github.com/unicef/etools.git","ssh_url":"git@github.com:unicef/etools.git","clone_url":"https://github.com/unicef/etools.git","svn_url":"https://github.com/unicef/etools","homepage":null,"size":65538,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unicef/etools/pulls/80"},"html":{"href":"https://github.com/unicef/etools/pull/80"},"issue":{"href":"https://api.github.com/repos/unicef/etools/issues/80"},"comments":{"href":"https://api.github.com/repos/unicef/etools/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/unicef/etools/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/unicef/etools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unicef/etools/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/unicef/etools/statuses/032e3d49f7142999db8c3ce66753cca2137054b0"}}}}
{"actor":{"display_login":"ilcsik"}}