{"action":"created","comment":{"url":"https://api.github.com/repos/AntonBox/django_shop/pulls/comments/112313006","pull_request_review_id":33616669,"id":112313006,"diff_hunk":"@@ -26,7 +31,7 @@ def add_cartitem(request):\n def change_cartitem(request):\n     cartitem_id = request.POST.get('cartitemid')\n     cartitem = get_object_or_404(CartItem, id=cartitem_id)\n-    if cartitem.cart.user == request.user:\n+    if cartitem.cart.user == request.user or cartitem.cart.token == request.session['token']:","path":"apps/cart/views.py","position":31,"original_position":31,"commit_id":"43b5ac06a447712c46f80f8f92bc60582c3604bf","original_commit_id":"43b5ac06a447712c46f80f8f92bc60582c3604bf","user":{"login":"AndrewPix","id":11962338,"avatar_url":"https://avatars3.githubusercontent.com/u/11962338?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewPix","html_url":"https://github.com/AndrewPix","followers_url":"https://api.github.com/users/AndrewPix/followers","following_url":"https://api.github.com/users/AndrewPix/following{/other_user}","gists_url":"https://api.github.com/users/AndrewPix/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewPix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewPix/subscriptions","organizations_url":"https://api.github.com/users/AndrewPix/orgs","repos_url":"https://api.github.com/users/AndrewPix/repos","events_url":"https://api.github.com/users/AndrewPix/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewPix/received_events","type":"User","site_admin":false},"body":"Такую проверку лучше сделать методом Cart, назвать можно is_permitted_for_request(request)","created_at":"2017-04-19T21:02:38Z","updated_at":"2017-04-19T21:05:42Z","html_url":"https://github.com/AntonBox/django_shop/pull/20#discussion_r112313006","pull_request_url":"https://api.github.com/repos/AntonBox/django_shop/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/AntonBox/django_shop/pulls/comments/112313006"},"html":{"href":"https://github.com/AntonBox/django_shop/pull/20#discussion_r112313006"},"pull_request":{"href":"https://api.github.com/repos/AntonBox/django_shop/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/AntonBox/django_shop/pulls/20","id":111383963,"html_url":"https://github.com/AntonBox/django_shop/pull/20","diff_url":"https://github.com/AntonBox/django_shop/pull/20.diff","patch_url":"https://github.com/AntonBox/django_shop/pull/20.patch","issue_url":"https://api.github.com/repos/AntonBox/django_shop/issues/20","number":20,"state":"open","locked":false,"title":"cart and order for anon user","user":{"login":"AntonBox","id":22803712,"avatar_url":"https://avatars1.githubusercontent.com/u/22803712?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonBox","html_url":"https://github.com/AntonBox","followers_url":"https://api.github.com/users/AntonBox/followers","following_url":"https://api.github.com/users/AntonBox/following{/other_user}","gists_url":"https://api.github.com/users/AntonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonBox/subscriptions","organizations_url":"https://api.github.com/users/AntonBox/orgs","repos_url":"https://api.github.com/users/AntonBox/repos","events_url":"https://api.github.com/users/AntonBox/events{/privacy}","received_events_url":"https://api.github.com/users/AntonBox/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-17T23:35:11Z","updated_at":"2017-04-19T21:05:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0306c8bfe37fe57775aca17ad42e3401cddacc19","assignee":{"login":"AndrewPix","id":11962338,"avatar_url":"https://avatars3.githubusercontent.com/u/11962338?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewPix","html_url":"https://github.com/AndrewPix","followers_url":"https://api.github.com/users/AndrewPix/followers","following_url":"https://api.github.com/users/AndrewPix/following{/other_user}","gists_url":"https://api.github.com/users/AndrewPix/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewPix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewPix/subscriptions","organizations_url":"https://api.github.com/users/AndrewPix/orgs","repos_url":"https://api.github.com/users/AndrewPix/repos","events_url":"https://api.github.com/users/AndrewPix/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewPix/received_events","type":"User","site_admin":false},"assignees":[{"login":"AndrewPix","id":11962338,"avatar_url":"https://avatars3.githubusercontent.com/u/11962338?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewPix","html_url":"https://github.com/AndrewPix","followers_url":"https://api.github.com/users/AndrewPix/followers","following_url":"https://api.github.com/users/AndrewPix/following{/other_user}","gists_url":"https://api.github.com/users/AndrewPix/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewPix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewPix/subscriptions","organizations_url":"https://api.github.com/users/AndrewPix/orgs","repos_url":"https://api.github.com/users/AndrewPix/repos","events_url":"https://api.github.com/users/AndrewPix/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewPix/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/AntonBox/django_shop/pulls/20/commits","review_comments_url":"https://api.github.com/repos/AntonBox/django_shop/pulls/20/comments","review_comment_url":"https://api.github.com/repos/AntonBox/django_shop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AntonBox/django_shop/issues/20/comments","statuses_url":"https://api.github.com/repos/AntonBox/django_shop/statuses/43b5ac06a447712c46f80f8f92bc60582c3604bf","head":{"label":"AntonBox:cart_coolies","ref":"cart_coolies","sha":"43b5ac06a447712c46f80f8f92bc60582c3604bf","user":{"login":"AntonBox","id":22803712,"avatar_url":"https://avatars1.githubusercontent.com/u/22803712?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonBox","html_url":"https://github.com/AntonBox","followers_url":"https://api.github.com/users/AntonBox/followers","following_url":"https://api.github.com/users/AntonBox/following{/other_user}","gists_url":"https://api.github.com/users/AntonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonBox/subscriptions","organizations_url":"https://api.github.com/users/AntonBox/orgs","repos_url":"https://api.github.com/users/AntonBox/repos","events_url":"https://api.github.com/users/AntonBox/events{/privacy}","received_events_url":"https://api.github.com/users/AntonBox/received_events","type":"User","site_admin":false},"repo":{"id":71412077,"name":"django_shop","full_name":"AntonBox/django_shop","owner":{"login":"AntonBox","id":22803712,"avatar_url":"https://avatars1.githubusercontent.com/u/22803712?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonBox","html_url":"https://github.com/AntonBox","followers_url":"https://api.github.com/users/AntonBox/followers","following_url":"https://api.github.com/users/AntonBox/following{/other_user}","gists_url":"https://api.github.com/users/AntonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonBox/subscriptions","organizations_url":"https://api.github.com/users/AntonBox/orgs","repos_url":"https://api.github.com/users/AntonBox/repos","events_url":"https://api.github.com/users/AntonBox/events{/privacy}","received_events_url":"https://api.github.com/users/AntonBox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AntonBox/django_shop","description":null,"fork":false,"url":"https://api.github.com/repos/AntonBox/django_shop","forks_url":"https://api.github.com/repos/AntonBox/django_shop/forks","keys_url":"https://api.github.com/repos/AntonBox/django_shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AntonBox/django_shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AntonBox/django_shop/teams","hooks_url":"https://api.github.com/repos/AntonBox/django_shop/hooks","issue_events_url":"https://api.github.com/repos/AntonBox/django_shop/issues/events{/number}","events_url":"https://api.github.com/repos/AntonBox/django_shop/events","assignees_url":"https://api.github.com/repos/AntonBox/django_shop/assignees{/user}","branches_url":"https://api.github.com/repos/AntonBox/django_shop/branches{/branch}","tags_url":"https://api.github.com/repos/AntonBox/django_shop/tags","blobs_url":"https://api.github.com/repos/AntonBox/django_shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AntonBox/django_shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AntonBox/django_shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/AntonBox/django_shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AntonBox/django_shop/statuses/{sha}","languages_url":"https://api.github.com/repos/AntonBox/django_shop/languages","stargazers_url":"https://api.github.com/repos/AntonBox/django_shop/stargazers","contributors_url":"https://api.github.com/repos/AntonBox/django_shop/contributors","subscribers_url":"https://api.github.com/repos/AntonBox/django_shop/subscribers","subscription_url":"https://api.github.com/repos/AntonBox/django_shop/subscription","commits_url":"https://api.github.com/repos/AntonBox/django_shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/AntonBox/django_shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/AntonBox/django_shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/AntonBox/django_shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/AntonBox/django_shop/contents/{+path}","compare_url":"https://api.github.com/repos/AntonBox/django_shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AntonBox/django_shop/merges","archive_url":"https://api.github.com/repos/AntonBox/django_shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AntonBox/django_shop/downloads","issues_url":"https://api.github.com/repos/AntonBox/django_shop/issues{/number}","pulls_url":"https://api.github.com/repos/AntonBox/django_shop/pulls{/number}","milestones_url":"https://api.github.com/repos/AntonBox/django_shop/milestones{/number}","notifications_url":"https://api.github.com/repos/AntonBox/django_shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AntonBox/django_shop/labels{/name}","releases_url":"https://api.github.com/repos/AntonBox/django_shop/releases{/id}","deployments_url":"https://api.github.com/repos/AntonBox/django_shop/deployments","created_at":"2016-10-20T00:53:25Z","updated_at":"2016-11-17T15:35:05Z","pushed_at":"2017-04-19T14:31:20Z","git_url":"git://github.com/AntonBox/django_shop.git","ssh_url":"git@github.com:AntonBox/django_shop.git","clone_url":"https://github.com/AntonBox/django_shop.git","svn_url":"https://github.com/AntonBox/django_shop","homepage":null,"size":1722,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"AntonBox:master","ref":"master","sha":"2237d04697823c37bd7f092a0a4d05b8ebbf561d","user":{"login":"AntonBox","id":22803712,"avatar_url":"https://avatars1.githubusercontent.com/u/22803712?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonBox","html_url":"https://github.com/AntonBox","followers_url":"https://api.github.com/users/AntonBox/followers","following_url":"https://api.github.com/users/AntonBox/following{/other_user}","gists_url":"https://api.github.com/users/AntonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonBox/subscriptions","organizations_url":"https://api.github.com/users/AntonBox/orgs","repos_url":"https://api.github.com/users/AntonBox/repos","events_url":"https://api.github.com/users/AntonBox/events{/privacy}","received_events_url":"https://api.github.com/users/AntonBox/received_events","type":"User","site_admin":false},"repo":{"id":71412077,"name":"django_shop","full_name":"AntonBox/django_shop","owner":{"login":"AntonBox","id":22803712,"avatar_url":"https://avatars1.githubusercontent.com/u/22803712?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonBox","html_url":"https://github.com/AntonBox","followers_url":"https://api.github.com/users/AntonBox/followers","following_url":"https://api.github.com/users/AntonBox/following{/other_user}","gists_url":"https://api.github.com/users/AntonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonBox/subscriptions","organizations_url":"https://api.github.com/users/AntonBox/orgs","repos_url":"https://api.github.com/users/AntonBox/repos","events_url":"https://api.github.com/users/AntonBox/events{/privacy}","received_events_url":"https://api.github.com/users/AntonBox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AntonBox/django_shop","description":null,"fork":false,"url":"https://api.github.com/repos/AntonBox/django_shop","forks_url":"https://api.github.com/repos/AntonBox/django_shop/forks","keys_url":"https://api.github.com/repos/AntonBox/django_shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AntonBox/django_shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AntonBox/django_shop/teams","hooks_url":"https://api.github.com/repos/AntonBox/django_shop/hooks","issue_events_url":"https://api.github.com/repos/AntonBox/django_shop/issues/events{/number}","events_url":"https://api.github.com/repos/AntonBox/django_shop/events","assignees_url":"https://api.github.com/repos/AntonBox/django_shop/assignees{/user}","branches_url":"https://api.github.com/repos/AntonBox/django_shop/branches{/branch}","tags_url":"https://api.github.com/repos/AntonBox/django_shop/tags","blobs_url":"https://api.github.com/repos/AntonBox/django_shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AntonBox/django_shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AntonBox/django_shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/AntonBox/django_shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AntonBox/django_shop/statuses/{sha}","languages_url":"https://api.github.com/repos/AntonBox/django_shop/languages","stargazers_url":"https://api.github.com/repos/AntonBox/django_shop/stargazers","contributors_url":"https://api.github.com/repos/AntonBox/django_shop/contributors","subscribers_url":"https://api.github.com/repos/AntonBox/django_shop/subscribers","subscription_url":"https://api.github.com/repos/AntonBox/django_shop/subscription","commits_url":"https://api.github.com/repos/AntonBox/django_shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/AntonBox/django_shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/AntonBox/django_shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/AntonBox/django_shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/AntonBox/django_shop/contents/{+path}","compare_url":"https://api.github.com/repos/AntonBox/django_shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AntonBox/django_shop/merges","archive_url":"https://api.github.com/repos/AntonBox/django_shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AntonBox/django_shop/downloads","issues_url":"https://api.github.com/repos/AntonBox/django_shop/issues{/number}","pulls_url":"https://api.github.com/repos/AntonBox/django_shop/pulls{/number}","milestones_url":"https://api.github.com/repos/AntonBox/django_shop/milestones{/number}","notifications_url":"https://api.github.com/repos/AntonBox/django_shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AntonBox/django_shop/labels{/name}","releases_url":"https://api.github.com/repos/AntonBox/django_shop/releases{/id}","deployments_url":"https://api.github.com/repos/AntonBox/django_shop/deployments","created_at":"2016-10-20T00:53:25Z","updated_at":"2016-11-17T15:35:05Z","pushed_at":"2017-04-19T14:31:20Z","git_url":"git://github.com/AntonBox/django_shop.git","ssh_url":"git@github.com:AntonBox/django_shop.git","clone_url":"https://github.com/AntonBox/django_shop.git","svn_url":"https://github.com/AntonBox/django_shop","homepage":null,"size":1722,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AntonBox/django_shop/pulls/20"},"html":{"href":"https://github.com/AntonBox/django_shop/pull/20"},"issue":{"href":"https://api.github.com/repos/AntonBox/django_shop/issues/20"},"comments":{"href":"https://api.github.com/repos/AntonBox/django_shop/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/AntonBox/django_shop/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/AntonBox/django_shop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AntonBox/django_shop/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/AntonBox/django_shop/statuses/43b5ac06a447712c46f80f8f92bc60582c3604bf"}}}}
{"actor":{"display_login":"AndrewPix"}}