{"action":"opened","number":345,"pull_request":{"url":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/345","id":98150807,"html_url":"https://github.com/jleclanche/django-push-notifications/pull/345","diff_url":"https://github.com/jleclanche/django-push-notifications/pull/345.diff","patch_url":"https://github.com/jleclanche/django-push-notifications/pull/345.patch","issue_url":"https://api.github.com/repos/jleclanche/django-push-notifications/issues/345","number":345,"state":"open","locked":false,"title":"Fix issue with user change on a Device (#296)","user":{"login":"PierreF","id":359833,"avatar_url":"https://avatars.githubusercontent.com/u/359833?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreF","html_url":"https://github.com/PierreF","followers_url":"https://api.github.com/users/PierreF/followers","following_url":"https://api.github.com/users/PierreF/following{/other_user}","gists_url":"https://api.github.com/users/PierreF/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreF/subscriptions","organizations_url":"https://api.github.com/users/PierreF/orgs","repos_url":"https://api.github.com/users/PierreF/repos","events_url":"https://api.github.com/users/PierreF/events{/privacy}","received_events_url":"https://api.github.com/users/PierreF/received_events","type":"User","site_admin":false},"body":"This is a fix for #296 . It's the [solution](https://github.com/jleclanche/django-push-notifications/issues/296#issuecomment-225462380) proposed by @chozabu with the following modification:\r\n\r\n* Don't do repeat the create method, use self.queryset.model to access GCMDevice or APNSDevice\r\n* Add the setting in PUSH_NOTIFICATIONS_SETTINGS\r\n* Don't crash if \"registration_id\" is not in request.data :)\r\n\r\n\r\n","created_at":"2016-12-15T13:31:17Z","updated_at":"2016-12-15T13:31:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/345/commits","review_comments_url":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/345/comments","review_comment_url":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jleclanche/django-push-notifications/issues/345/comments","statuses_url":"https://api.github.com/repos/jleclanche/django-push-notifications/statuses/2c948da919300e92d53d559a49c0d31220fda9b1","head":{"label":"PierreF:issue-296","ref":"issue-296","sha":"2c948da919300e92d53d559a49c0d31220fda9b1","user":{"login":"PierreF","id":359833,"avatar_url":"https://avatars.githubusercontent.com/u/359833?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreF","html_url":"https://github.com/PierreF","followers_url":"https://api.github.com/users/PierreF/followers","following_url":"https://api.github.com/users/PierreF/following{/other_user}","gists_url":"https://api.github.com/users/PierreF/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreF/subscriptions","organizations_url":"https://api.github.com/users/PierreF/orgs","repos_url":"https://api.github.com/users/PierreF/repos","events_url":"https://api.github.com/users/PierreF/events{/privacy}","received_events_url":"https://api.github.com/users/PierreF/received_events","type":"User","site_admin":false},"repo":{"id":76561008,"name":"django-push-notifications","full_name":"PierreF/django-push-notifications","owner":{"login":"PierreF","id":359833,"avatar_url":"https://avatars.githubusercontent.com/u/359833?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreF","html_url":"https://github.com/PierreF","followers_url":"https://api.github.com/users/PierreF/followers","following_url":"https://api.github.com/users/PierreF/following{/other_user}","gists_url":"https://api.github.com/users/PierreF/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreF/subscriptions","organizations_url":"https://api.github.com/users/PierreF/orgs","repos_url":"https://api.github.com/users/PierreF/repos","events_url":"https://api.github.com/users/PierreF/events{/privacy}","received_events_url":"https://api.github.com/users/PierreF/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PierreF/django-push-notifications","description":"Send push notifications to mobile devices through GCM or APNS in Django.","fork":true,"url":"https://api.github.com/repos/PierreF/django-push-notifications","forks_url":"https://api.github.com/repos/PierreF/django-push-notifications/forks","keys_url":"https://api.github.com/repos/PierreF/django-push-notifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PierreF/django-push-notifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PierreF/django-push-notifications/teams","hooks_url":"https://api.github.com/repos/PierreF/django-push-notifications/hooks","issue_events_url":"https://api.github.com/repos/PierreF/django-push-notifications/issues/events{/number}","events_url":"https://api.github.com/repos/PierreF/django-push-notifications/events","assignees_url":"https://api.github.com/repos/PierreF/django-push-notifications/assignees{/user}","branches_url":"https://api.github.com/repos/PierreF/django-push-notifications/branches{/branch}","tags_url":"https://api.github.com/repos/PierreF/django-push-notifications/tags","blobs_url":"https://api.github.com/repos/PierreF/django-push-notifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PierreF/django-push-notifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PierreF/django-push-notifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/PierreF/django-push-notifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PierreF/django-push-notifications/statuses/{sha}","languages_url":"https://api.github.com/repos/PierreF/django-push-notifications/languages","stargazers_url":"https://api.github.com/repos/PierreF/django-push-notifications/stargazers","contributors_url":"https://api.github.com/repos/PierreF/django-push-notifications/contributors","subscribers_url":"https://api.github.com/repos/PierreF/django-push-notifications/subscribers","subscription_url":"https://api.github.com/repos/PierreF/django-push-notifications/subscription","commits_url":"https://api.github.com/repos/PierreF/django-push-notifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/PierreF/django-push-notifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/PierreF/django-push-notifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/PierreF/django-push-notifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/PierreF/django-push-notifications/contents/{+path}","compare_url":"https://api.github.com/repos/PierreF/django-push-notifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PierreF/django-push-notifications/merges","archive_url":"https://api.github.com/repos/PierreF/django-push-notifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PierreF/django-push-notifications/downloads","issues_url":"https://api.github.com/repos/PierreF/django-push-notifications/issues{/number}","pulls_url":"https://api.github.com/repos/PierreF/django-push-notifications/pulls{/number}","milestones_url":"https://api.github.com/repos/PierreF/django-push-notifications/milestones{/number}","notifications_url":"https://api.github.com/repos/PierreF/django-push-notifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PierreF/django-push-notifications/labels{/name}","releases_url":"https://api.github.com/repos/PierreF/django-push-notifications/releases{/id}","deployments_url":"https://api.github.com/repos/PierreF/django-push-notifications/deployments","created_at":"2016-12-15T13:14:53Z","updated_at":"2016-12-15T13:14:54Z","pushed_at":"2016-12-15T13:20:10Z","git_url":"git://github.com/PierreF/django-push-notifications.git","ssh_url":"git@github.com:PierreF/django-push-notifications.git","clone_url":"https://github.com/PierreF/django-push-notifications.git","svn_url":"https://github.com/PierreF/django-push-notifications","homepage":null,"size":541,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jleclanche:master","ref":"master","sha":"fcebfc1a3c66e761f46641977106a1caee7291b0","user":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"repo":{"id":8788941,"name":"django-push-notifications","full_name":"jleclanche/django-push-notifications","owner":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jleclanche/django-push-notifications","description":"Send push notifications to mobile devices through GCM or APNS in Django.","fork":false,"url":"https://api.github.com/repos/jleclanche/django-push-notifications","forks_url":"https://api.github.com/repos/jleclanche/django-push-notifications/forks","keys_url":"https://api.github.com/repos/jleclanche/django-push-notifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jleclanche/django-push-notifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jleclanche/django-push-notifications/teams","hooks_url":"https://api.github.com/repos/jleclanche/django-push-notifications/hooks","issue_events_url":"https://api.github.com/repos/jleclanche/django-push-notifications/issues/events{/number}","events_url":"https://api.github.com/repos/jleclanche/django-push-notifications/events","assignees_url":"https://api.github.com/repos/jleclanche/django-push-notifications/assignees{/user}","branches_url":"https://api.github.com/repos/jleclanche/django-push-notifications/branches{/branch}","tags_url":"https://api.github.com/repos/jleclanche/django-push-notifications/tags","blobs_url":"https://api.github.com/repos/jleclanche/django-push-notifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jleclanche/django-push-notifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jleclanche/django-push-notifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/jleclanche/django-push-notifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jleclanche/django-push-notifications/statuses/{sha}","languages_url":"https://api.github.com/repos/jleclanche/django-push-notifications/languages","stargazers_url":"https://api.github.com/repos/jleclanche/django-push-notifications/stargazers","contributors_url":"https://api.github.com/repos/jleclanche/django-push-notifications/contributors","subscribers_url":"https://api.github.com/repos/jleclanche/django-push-notifications/subscribers","subscription_url":"https://api.github.com/repos/jleclanche/django-push-notifications/subscription","commits_url":"https://api.github.com/repos/jleclanche/django-push-notifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/jleclanche/django-push-notifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/jleclanche/django-push-notifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/jleclanche/django-push-notifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/jleclanche/django-push-notifications/contents/{+path}","compare_url":"https://api.github.com/repos/jleclanche/django-push-notifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jleclanche/django-push-notifications/merges","archive_url":"https://api.github.com/repos/jleclanche/django-push-notifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jleclanche/django-push-notifications/downloads","issues_url":"https://api.github.com/repos/jleclanche/django-push-notifications/issues{/number}","pulls_url":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls{/number}","milestones_url":"https://api.github.com/repos/jleclanche/django-push-notifications/milestones{/number}","notifications_url":"https://api.github.com/repos/jleclanche/django-push-notifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jleclanche/django-push-notifications/labels{/name}","releases_url":"https://api.github.com/repos/jleclanche/django-push-notifications/releases{/id}","deployments_url":"https://api.github.com/repos/jleclanche/django-push-notifications/deployments","created_at":"2013-03-15T00:57:33Z","updated_at":"2016-12-15T10:18:59Z","pushed_at":"2016-12-15T13:31:17Z","git_url":"git://github.com/jleclanche/django-push-notifications.git","ssh_url":"git@github.com:jleclanche/django-push-notifications.git","clone_url":"https://github.com/jleclanche/django-push-notifications.git","svn_url":"https://github.com/jleclanche/django-push-notifications","homepage":null,"size":541,"stargazers_count":835,"watchers_count":835,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":304,"mirror_url":null,"open_issues_count":53,"forks":304,"open_issues":53,"watchers":835,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/345"},"html":{"href":"https://github.com/jleclanche/django-push-notifications/pull/345"},"issue":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/issues/345"},"comments":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/issues/345/comments"},"review_comments":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/345/comments"},"review_comment":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/pulls/345/commits"},"statuses":{"href":"https://api.github.com/repos/jleclanche/django-push-notifications/statuses/2c948da919300e92d53d559a49c0d31220fda9b1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":35,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"PierreF"}}