{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/126395980","pull_request_review_id":48874753,"id":126395980,"diff_hunk":"@@ -1000,9 +1000,12 @@ def prepare_lookup_value(self, value, lookups, can_reuse, allow_joins=True):\n         # Interpret '__exact=None' as the sql 'is NULL'; otherwise, reject all\n         # uses of None as a query value.\n         if value is None:\n-            if lookups[-1] not in ('exact', 'iexact'):\n-                raise ValueError(\"Cannot use None as a query value\")\n-            return True, ['isnull'], used_joins\n+            if lookups[-1] not in self.query_terms:","path":"django/db/models/sql/query.py","position":7,"original_position":7,"commit_id":"ea4f3c5793ecefb9231472e0e6dbd728412cf092","original_commit_id":"ea4f3c5793ecefb9231472e0e6dbd728412cf092","user":{"login":"Stranger6667","id":1236561,"avatar_url":"https://avatars1.githubusercontent.com/u/1236561?v=3","gravatar_id":"","url":"https://api.github.com/users/Stranger6667","html_url":"https://github.com/Stranger6667","followers_url":"https://api.github.com/users/Stranger6667/followers","following_url":"https://api.github.com/users/Stranger6667/following{/other_user}","gists_url":"https://api.github.com/users/Stranger6667/gists{/gist_id}","starred_url":"https://api.github.com/users/Stranger6667/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stranger6667/subscriptions","organizations_url":"https://api.github.com/users/Stranger6667/orgs","repos_url":"https://api.github.com/users/Stranger6667/repos","events_url":"https://api.github.com/users/Stranger6667/events{/privacy}","received_events_url":"https://api.github.com/users/Stranger6667/received_events","type":"User","site_admin":false},"body":"Is there a better way to detect it?","created_at":"2017-07-10T11:32:55Z","updated_at":"2017-07-10T11:32:55Z","html_url":"https://github.com/django/django/pull/8239#discussion_r126395980","pull_request_url":"https://api.github.com/repos/django/django/pulls/8239","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/126395980"},"html":{"href":"https://github.com/django/django/pull/8239#discussion_r126395980"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/8239"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/8239","id":112234799,"html_url":"https://github.com/django/django/pull/8239","diff_url":"https://github.com/django/django/pull/8239.diff","patch_url":"https://github.com/django/django/pull/8239.patch","issue_url":"https://api.github.com/repos/django/django/issues/8239","number":8239,"state":"open","locked":false,"title":"Fixed #25718 -- Allowed using None as a JSONField lookup value.","user":{"login":"Stranger6667","id":1236561,"avatar_url":"https://avatars1.githubusercontent.com/u/1236561?v=3","gravatar_id":"","url":"https://api.github.com/users/Stranger6667","html_url":"https://github.com/Stranger6667","followers_url":"https://api.github.com/users/Stranger6667/followers","following_url":"https://api.github.com/users/Stranger6667/following{/other_user}","gists_url":"https://api.github.com/users/Stranger6667/gists{/gist_id}","starred_url":"https://api.github.com/users/Stranger6667/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stranger6667/subscriptions","organizations_url":"https://api.github.com/users/Stranger6667/orgs","repos_url":"https://api.github.com/users/Stranger6667/repos","events_url":"https://api.github.com/users/Stranger6667/events{/privacy}","received_events_url":"https://api.github.com/users/Stranger6667/received_events","type":"User","site_admin":false},"body":"It's my follow up on #5617.\r\nIn general it provides an ability to use ``None`` in queries if querying is applied to some key inside value of ``JSONBField``.\r\n\r\nThank you!","created_at":"2017-03-23T13:16:04Z","updated_at":"2017-07-10T11:32:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8de8eaa49f359123c3cfff738613c382752af2a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/8239/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/8239/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/8239/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/ea4f3c5793ecefb9231472e0e6dbd728412cf092","head":{"label":"Stranger6667:ticket-25718","ref":"ticket-25718","sha":"ea4f3c5793ecefb9231472e0e6dbd728412cf092","user":{"login":"Stranger6667","id":1236561,"avatar_url":"https://avatars1.githubusercontent.com/u/1236561?v=3","gravatar_id":"","url":"https://api.github.com/users/Stranger6667","html_url":"https://github.com/Stranger6667","followers_url":"https://api.github.com/users/Stranger6667/followers","following_url":"https://api.github.com/users/Stranger6667/following{/other_user}","gists_url":"https://api.github.com/users/Stranger6667/gists{/gist_id}","starred_url":"https://api.github.com/users/Stranger6667/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stranger6667/subscriptions","organizations_url":"https://api.github.com/users/Stranger6667/orgs","repos_url":"https://api.github.com/users/Stranger6667/repos","events_url":"https://api.github.com/users/Stranger6667/events{/privacy}","received_events_url":"https://api.github.com/users/Stranger6667/received_events","type":"User","site_admin":false},"repo":{"id":79102143,"name":"django","full_name":"Stranger6667/django","owner":{"login":"Stranger6667","id":1236561,"avatar_url":"https://avatars1.githubusercontent.com/u/1236561?v=3","gravatar_id":"","url":"https://api.github.com/users/Stranger6667","html_url":"https://github.com/Stranger6667","followers_url":"https://api.github.com/users/Stranger6667/followers","following_url":"https://api.github.com/users/Stranger6667/following{/other_user}","gists_url":"https://api.github.com/users/Stranger6667/gists{/gist_id}","starred_url":"https://api.github.com/users/Stranger6667/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stranger6667/subscriptions","organizations_url":"https://api.github.com/users/Stranger6667/orgs","repos_url":"https://api.github.com/users/Stranger6667/repos","events_url":"https://api.github.com/users/Stranger6667/events{/privacy}","received_events_url":"https://api.github.com/users/Stranger6667/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Stranger6667/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/Stranger6667/django","forks_url":"https://api.github.com/repos/Stranger6667/django/forks","keys_url":"https://api.github.com/repos/Stranger6667/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stranger6667/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stranger6667/django/teams","hooks_url":"https://api.github.com/repos/Stranger6667/django/hooks","issue_events_url":"https://api.github.com/repos/Stranger6667/django/issues/events{/number}","events_url":"https://api.github.com/repos/Stranger6667/django/events","assignees_url":"https://api.github.com/repos/Stranger6667/django/assignees{/user}","branches_url":"https://api.github.com/repos/Stranger6667/django/branches{/branch}","tags_url":"https://api.github.com/repos/Stranger6667/django/tags","blobs_url":"https://api.github.com/repos/Stranger6667/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stranger6667/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stranger6667/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stranger6667/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stranger6667/django/statuses/{sha}","languages_url":"https://api.github.com/repos/Stranger6667/django/languages","stargazers_url":"https://api.github.com/repos/Stranger6667/django/stargazers","contributors_url":"https://api.github.com/repos/Stranger6667/django/contributors","subscribers_url":"https://api.github.com/repos/Stranger6667/django/subscribers","subscription_url":"https://api.github.com/repos/Stranger6667/django/subscription","commits_url":"https://api.github.com/repos/Stranger6667/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stranger6667/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stranger6667/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stranger6667/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/Stranger6667/django/contents/{+path}","compare_url":"https://api.github.com/repos/Stranger6667/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stranger6667/django/merges","archive_url":"https://api.github.com/repos/Stranger6667/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stranger6667/django/downloads","issues_url":"https://api.github.com/repos/Stranger6667/django/issues{/number}","pulls_url":"https://api.github.com/repos/Stranger6667/django/pulls{/number}","milestones_url":"https://api.github.com/repos/Stranger6667/django/milestones{/number}","notifications_url":"https://api.github.com/repos/Stranger6667/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stranger6667/django/labels{/name}","releases_url":"https://api.github.com/repos/Stranger6667/django/releases{/id}","deployments_url":"https://api.github.com/repos/Stranger6667/django/deployments","created_at":"2017-01-16T09:20:58Z","updated_at":"2017-01-16T09:21:23Z","pushed_at":"2017-05-15T21:08:55Z","git_url":"git://github.com/Stranger6667/django.git","ssh_url":"git@github.com:Stranger6667/django.git","clone_url":"https://github.com/Stranger6667/django.git","svn_url":"https://github.com/Stranger6667/django","homepage":"https://www.djangoproject.com/","size":162943,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"650bf6714d5648811a8bc08ce53b7fa86cc38d40","user":{"login":"django","id":27804,"avatar_url":"https://avatars1.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://avatars1.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}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2017-07-10T09:49:52Z","pushed_at":"2017-07-10T11:25:58Z","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":165466,"stargazers_count":26741,"watchers_count":26741,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11097,"mirror_url":null,"open_issues_count":135,"forks":11097,"open_issues":135,"watchers":26741,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/8239"},"html":{"href":"https://github.com/django/django/pull/8239"},"issue":{"href":"https://api.github.com/repos/django/django/issues/8239"},"comments":{"href":"https://api.github.com/repos/django/django/issues/8239/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/8239/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/8239/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/ea4f3c5793ecefb9231472e0e6dbd728412cf092"}}}}
{"actor":{"display_login":"Stranger6667"}}