I have a situation like this:
ids = [None, None, None]
foo = Foo.objects.filter(common=True).exclude(id__in=ids)
This seems to exclude all always.
Why is id
of id__in
threated as None
in this case? pk__in
didn't work either. I expect it to not exclude anything as all objects have valid id's.
foo = Foo.objects.filter(common=True)
Returns all objects like expected.