Simplified QuerySet field.null handling #21

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@akaariai
Django member

QuerySet had previously some complex logic for dealing with nullable
fields in negated add_filter() calls. It seems the logic is leftover
from a time where the WhereNode wasn't as intelligent in handling
field__in=[] conditions.

All tests passed on SQLite. I believe all tests should pass on other
backends, too.

The reason why this should be fixed is that it is very hard to see what
is happening in the negated field.null case currently. I hope this patch
makes the logic and why the condition is added clearer

@akaariai akaariai Simplified QuerySet field.null handling
QuerySet had previously some complex logic for dealing with nullable
fields in negated add_filter() calls. It seems the logic is leftover
from a time where the WhereNode wasn't as intelligent in handling
field__in=[] conditions.
8f9fed5
@akaariai
Django member

I pushed the patch manually by git push - no need for this pull request any more.

@akaariai akaariai closed this Apr 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment