{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/26705259","id":26705259,"diff_hunk":"@@ -1856,6 +1857,7 @@ class ForeignKey(ForeignObject):\n \n     rel_class = ManyToOneRel\n \n+    allow_unsaved_instance_assignment = False","path":"django/db/models/fields/related.py","position":30,"original_position":30,"commit_id":"26d9c0c5285fe6718207ad1716f4a767134ce62a","original_commit_id":"26d9c0c5285fe6718207ad1716f4a767134ce62a","user":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"body":"I'll remove this as ``ForeignKey`` is a subclass of ``ForeignObject``","created_at":"2015-03-18T20:43:57Z","updated_at":"2015-03-18T20:43:57Z","html_url":"https://github.com/django/django/pull/4334#discussion_r26705259","pull_request_url":"https://api.github.com/repos/django/django/pulls/4334","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/26705259"},"html":{"href":"https://github.com/django/django/pull/4334#discussion_r26705259"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/4334"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/4334","id":31280107,"html_url":"https://github.com/django/django/pull/4334","diff_url":"https://github.com/django/django/pull/4334.diff","patch_url":"https://github.com/django/django/pull/4334.patch","issue_url":"https://api.github.com/repos/django/django/issues/4334","number":4334,"state":"open","locked":false,"title":"Fixed  #24495 -- Allow unsaved instance in ForeignKey check to be bypassed","user":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"body":"This pull request implements an ``allow_unsaved_instance_assignment`` flag which can be used by custom related fields to opt-out of the new check implemented in: https://github.com/django/django/commit/5643a3b51be338196d0b292d5626ad43648448d3","created_at":"2015-03-16T20:15:14Z","updated_at":"2015-03-18T20:43:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61f96d809a4db800f1a91c8b6e030192d7edcfa5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/4334/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/4334/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/4334/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/26d9c0c5285fe6718207ad1716f4a767134ce62a","head":{"label":"kaedroho:unsaved-instance-change","ref":"unsaved-instance-change","sha":"26d9c0c5285fe6718207ad1716f4a767134ce62a","user":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"repo":{"id":25149806,"name":"django","full_name":"kaedroho/django","owner":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kaedroho/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/kaedroho/django","forks_url":"https://api.github.com/repos/kaedroho/django/forks","keys_url":"https://api.github.com/repos/kaedroho/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaedroho/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaedroho/django/teams","hooks_url":"https://api.github.com/repos/kaedroho/django/hooks","issue_events_url":"https://api.github.com/repos/kaedroho/django/issues/events{/number}","events_url":"https://api.github.com/repos/kaedroho/django/events","assignees_url":"https://api.github.com/repos/kaedroho/django/assignees{/user}","branches_url":"https://api.github.com/repos/kaedroho/django/branches{/branch}","tags_url":"https://api.github.com/repos/kaedroho/django/tags","blobs_url":"https://api.github.com/repos/kaedroho/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaedroho/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaedroho/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaedroho/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaedroho/django/statuses/{sha}","languages_url":"https://api.github.com/repos/kaedroho/django/languages","stargazers_url":"https://api.github.com/repos/kaedroho/django/stargazers","contributors_url":"https://api.github.com/repos/kaedroho/django/contributors","subscribers_url":"https://api.github.com/repos/kaedroho/django/subscribers","subscription_url":"https://api.github.com/repos/kaedroho/django/subscription","commits_url":"https://api.github.com/repos/kaedroho/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaedroho/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaedroho/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaedroho/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaedroho/django/contents/{+path}","compare_url":"https://api.github.com/repos/kaedroho/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaedroho/django/merges","archive_url":"https://api.github.com/repos/kaedroho/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaedroho/django/downloads","issues_url":"https://api.github.com/repos/kaedroho/django/issues{/number}","pulls_url":"https://api.github.com/repos/kaedroho/django/pulls{/number}","milestones_url":"https://api.github.com/repos/kaedroho/django/milestones{/number}","notifications_url":"https://api.github.com/repos/kaedroho/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaedroho/django/labels{/name}","releases_url":"https://api.github.com/repos/kaedroho/django/releases{/id}","created_at":"2014-10-13T08:18:49Z","updated_at":"2014-11-24T09:52:15Z","pushed_at":"2015-03-18T20:40:07Z","git_url":"git://github.com/kaedroho/django.git","ssh_url":"git@github.com:kaedroho/django.git","clone_url":"https://github.com/kaedroho/django.git","svn_url":"https://github.com/kaedroho/django","homepage":"https://www.djangoproject.com/","size":123884,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"django:master","ref":"master","sha":"65129aac07022f23afa1df7ec7fad2216634cb38","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-03-18T19:34:53Z","pushed_at":"2015-03-18T18:28:32Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":268549,"stargazers_count":13337,"watchers_count":13337,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5239,"mirror_url":null,"open_issues_count":81,"forks":5239,"open_issues":81,"watchers":13337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/4334"},"html":{"href":"https://github.com/django/django/pull/4334"},"issue":{"href":"https://api.github.com/repos/django/django/issues/4334"},"comments":{"href":"https://api.github.com/repos/django/django/issues/4334/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/4334/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/4334/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/26d9c0c5285fe6718207ad1716f4a767134ce62a"}}}}