[Solved]-Django Queryset __in with None value in list

11👍

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

2👍

It seems to be and old bug in Django (https://code.djangoproject.com/ticket/13768).

I just made few tests with Django 1.5 and it still is there: ‘None’ gets ignored when used in a list applied to “__in” (no errors).

Catherine approach works like a charm 🙂

👤swK

Leave a comment