﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32078	Inconsistent JSONField filtering for value None	fre-db	nobody	"When a JSONField has a key with Value `None` , only filtering on `__key__in=[None]` works, while you'd expect you could also just filter on `__key=None` or `__key__isnull=True`. 

Example below:

{{{
import django
print(django.__version__)
3.1.2
print(Model.objects.get(pk=99657).jsonfield)
{'key': None}
print(Model.objects.filter(jsonfield__key=None).filter(pk=99657).count())
0
print(Model.objects.filter(jsonfield__key__is_null=True).filter(pk=99657).count())
0
print(Model.objects.filter((jsonfield__key__in=[None]).filter(pk=99657).count())
1
}}}
"	Uncategorized	closed	Database layer (models, ORM)	3.1	Normal	worksforme	JSONField, None		Unreviewed	0	0	0	0	0	0
