Ticket #2737: none-isnull.patch

File none-isnull.patch, 523 bytes (added by Collin Grady <cgrady@…>, 18 years ago)
  • django/db/models/query.py

     
    827827            # all uses of None as a query value.
    828828            if lookup_type != 'exact':
    829829                raise ValueError, "Cannot use None as a query value"
     830            else:
     831                lookup_type = 'isnull'
     832                value = True
    830833        elif callable(value):
    831834            value = value()
    832835
Back to Top