a = M.objects.filter(f__in=[None, 1])
a.query.__str__()
u'SELECT * FROM "app_m" WHERE "app_m"."f" IN (None, 1)'
Don't you think it will be IN (NULL, 1)?
as:
a = M.objects.filter(f=None)
a.query.__str__()
u'SELECT * FROM "app_m" WHERE "app_m"."f" IS NULL'
Is this the default SQL behavior, django error, or am I missing something using f__in=?
Thank you in advance!
source
share