{"action":"created","comment":{"url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/comments/159014688","pull_request_review_id":85900986,"id":159014688,"diff_hunk":"@@ -12,8 +12,31 @@ def create(self, validated_data):\n             email = validated_data['email'],\n             username = validated_data['username'],\n         )\n+        \n+        user.set_password(validated_data['password'])\n+        user.save()\n+        (group, created) = Group.objects.get_or_create(name=\"cliente\")\n+        user.groups.add(group)\n+        user.save()\n+\n+        return user \n \n+class UsuarioAdminSerializer(serializers.ModelSerializer):\n+    class Meta:\n+        model = User\n+        fields = ('email', 'username', 'password')\n+        extra_kwargs = {'password': {'write_only': True}}\n+\n+    def create(self, validated_data):\n+        user = User(\n+            email = validated_data['email'],\n+            username = validated_data['username'],\n+        )\n+        \n         user.set_password(validated_data['password'])\n         user.save()\n+        (group, created) = Group.objects.get_or_create(name=\"admin_mercado\")","path":"mercadapp/usuario/serializers.py","position":37,"original_position":37,"commit_id":"5c61a192077d7826e7d1778cf262f0f929efebc8","original_commit_id":"5c61a192077d7826e7d1778cf262f0f929efebc8","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Unused variable 'created'](https://www.codacy.com/app/lucasvss/API-Rest-Mercadapp/pullRequest?prid=1193667)","created_at":"2017-12-29T00:33:32Z","updated_at":"2017-12-29T00:33:33Z","html_url":"https://github.com/lucasvss/API-Rest-Mercadapp/pull/13#discussion_r159014688","pull_request_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/comments/159014688"},"html":{"href":"https://github.com/lucasvss/API-Rest-Mercadapp/pull/13#discussion_r159014688"},"pull_request":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13","id":160439290,"html_url":"https://github.com/lucasvss/API-Rest-Mercadapp/pull/13","diff_url":"https://github.com/lucasvss/API-Rest-Mercadapp/pull/13.diff","patch_url":"https://github.com/lucasvss/API-Rest-Mercadapp/pull/13.patch","issue_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/13","number":13,"state":"open","locked":false,"title":"#11 integrar apps","user":{"login":"lucasvss","id":20243978,"avatar_url":"https://avatars3.githubusercontent.com/u/20243978?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasvss","html_url":"https://github.com/lucasvss","followers_url":"https://api.github.com/users/lucasvss/followers","following_url":"https://api.github.com/users/lucasvss/following{/other_user}","gists_url":"https://api.github.com/users/lucasvss/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasvss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasvss/subscriptions","organizations_url":"https://api.github.com/users/lucasvss/orgs","repos_url":"https://api.github.com/users/lucasvss/repos","events_url":"https://api.github.com/users/lucasvss/events{/privacy}","received_events_url":"https://api.github.com/users/lucasvss/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-28T20:32:44Z","updated_at":"2017-12-29T00:33:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4da3b7e7fc64dfb1f146e5dede2041a2178e1091","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13/commits","review_comments_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13/comments","review_comment_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/13/comments","statuses_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/statuses/5c61a192077d7826e7d1778cf262f0f929efebc8","head":{"label":"lucasvss:#11_integrar_apps","ref":"#11_integrar_apps","sha":"5c61a192077d7826e7d1778cf262f0f929efebc8","user":{"login":"lucasvss","id":20243978,"avatar_url":"https://avatars3.githubusercontent.com/u/20243978?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasvss","html_url":"https://github.com/lucasvss","followers_url":"https://api.github.com/users/lucasvss/followers","following_url":"https://api.github.com/users/lucasvss/following{/other_user}","gists_url":"https://api.github.com/users/lucasvss/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasvss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasvss/subscriptions","organizations_url":"https://api.github.com/users/lucasvss/orgs","repos_url":"https://api.github.com/users/lucasvss/repos","events_url":"https://api.github.com/users/lucasvss/events{/privacy}","received_events_url":"https://api.github.com/users/lucasvss/received_events","type":"User","site_admin":false},"repo":{"id":115424379,"name":"API-Rest-Mercadapp","full_name":"lucasvss/API-Rest-Mercadapp","owner":{"login":"lucasvss","id":20243978,"avatar_url":"https://avatars3.githubusercontent.com/u/20243978?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasvss","html_url":"https://github.com/lucasvss","followers_url":"https://api.github.com/users/lucasvss/followers","following_url":"https://api.github.com/users/lucasvss/following{/other_user}","gists_url":"https://api.github.com/users/lucasvss/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasvss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasvss/subscriptions","organizations_url":"https://api.github.com/users/lucasvss/orgs","repos_url":"https://api.github.com/users/lucasvss/repos","events_url":"https://api.github.com/users/lucasvss/events{/privacy}","received_events_url":"https://api.github.com/users/lucasvss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucasvss/API-Rest-Mercadapp","description":null,"fork":false,"url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp","forks_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/forks","keys_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/teams","hooks_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/hooks","issue_events_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/events{/number}","events_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/events","assignees_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/assignees{/user}","branches_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/branches{/branch}","tags_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/tags","blobs_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/statuses/{sha}","languages_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/languages","stargazers_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/stargazers","contributors_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/contributors","subscribers_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/subscribers","subscription_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/subscription","commits_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/contents/{+path}","compare_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/merges","archive_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/downloads","issues_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues{/number}","pulls_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls{/number}","milestones_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/milestones{/number}","notifications_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/labels{/name}","releases_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/releases{/id}","deployments_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/deployments","created_at":"2017-12-26T13:25:28Z","updated_at":"2017-12-26T13:39:14Z","pushed_at":"2017-12-29T00:30:35Z","git_url":"git://github.com/lucasvss/API-Rest-Mercadapp.git","ssh_url":"git@github.com:lucasvss/API-Rest-Mercadapp.git","clone_url":"https://github.com/lucasvss/API-Rest-Mercadapp.git","svn_url":"https://github.com/lucasvss/API-Rest-Mercadapp","homepage":null,"size":489,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lucasvss:master","ref":"master","sha":"878f59f43f7852823d15301514f4b802b44a54c8","user":{"login":"lucasvss","id":20243978,"avatar_url":"https://avatars3.githubusercontent.com/u/20243978?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasvss","html_url":"https://github.com/lucasvss","followers_url":"https://api.github.com/users/lucasvss/followers","following_url":"https://api.github.com/users/lucasvss/following{/other_user}","gists_url":"https://api.github.com/users/lucasvss/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasvss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasvss/subscriptions","organizations_url":"https://api.github.com/users/lucasvss/orgs","repos_url":"https://api.github.com/users/lucasvss/repos","events_url":"https://api.github.com/users/lucasvss/events{/privacy}","received_events_url":"https://api.github.com/users/lucasvss/received_events","type":"User","site_admin":false},"repo":{"id":115424379,"name":"API-Rest-Mercadapp","full_name":"lucasvss/API-Rest-Mercadapp","owner":{"login":"lucasvss","id":20243978,"avatar_url":"https://avatars3.githubusercontent.com/u/20243978?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasvss","html_url":"https://github.com/lucasvss","followers_url":"https://api.github.com/users/lucasvss/followers","following_url":"https://api.github.com/users/lucasvss/following{/other_user}","gists_url":"https://api.github.com/users/lucasvss/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasvss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasvss/subscriptions","organizations_url":"https://api.github.com/users/lucasvss/orgs","repos_url":"https://api.github.com/users/lucasvss/repos","events_url":"https://api.github.com/users/lucasvss/events{/privacy}","received_events_url":"https://api.github.com/users/lucasvss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucasvss/API-Rest-Mercadapp","description":null,"fork":false,"url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp","forks_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/forks","keys_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/teams","hooks_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/hooks","issue_events_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/events{/number}","events_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/events","assignees_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/assignees{/user}","branches_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/branches{/branch}","tags_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/tags","blobs_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/statuses/{sha}","languages_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/languages","stargazers_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/stargazers","contributors_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/contributors","subscribers_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/subscribers","subscription_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/subscription","commits_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/contents/{+path}","compare_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/merges","archive_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/downloads","issues_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues{/number}","pulls_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls{/number}","milestones_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/milestones{/number}","notifications_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/labels{/name}","releases_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/releases{/id}","deployments_url":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/deployments","created_at":"2017-12-26T13:25:28Z","updated_at":"2017-12-26T13:39:14Z","pushed_at":"2017-12-29T00:30:35Z","git_url":"git://github.com/lucasvss/API-Rest-Mercadapp.git","ssh_url":"git@github.com:lucasvss/API-Rest-Mercadapp.git","clone_url":"https://github.com/lucasvss/API-Rest-Mercadapp.git","svn_url":"https://github.com/lucasvss/API-Rest-Mercadapp","homepage":null,"size":489,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13"},"html":{"href":"https://github.com/lucasvss/API-Rest-Mercadapp/pull/13"},"issue":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/13"},"comments":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/lucasvss/API-Rest-Mercadapp/statuses/5c61a192077d7826e7d1778cf262f0f929efebc8"}},"author_association":"OWNER"}}
{"actor":{"display_login":"codacy-bot"}}