Django Queryset __in with None value in list

django, django-models, django-orm, sql

Solution

a = M.objects.filter(Q(f__isnull=True) | Q(f__in=['1',...])) 

Problem

``` a = M.objects.filter(f__in=[None, 1]) a.query.__str__() u'SELECT * FROM "app_m" WHERE "app_m"."f" IN (None, 1)' ``` dont you think that would be `IN (NULL, 1)` ? like: ``` a = M.objects.filter(f=None) a.query.__str__() u'SELECT * FROM "app_m" WHERE "app_m"."f" IS NULL' ``` Is this a default SQL behavior, django bug or I am missing something with `f__in=` ? thank you in advance!

Original source