hearsaycorp / django-livefield

Convenient soft-deletion for Django models.
MIT License
35 stars 19 forks source link

`LiveField.get_prep_lookup()` doesn't work with `value=None` #20

Closed awbush closed 5 years ago

awbush commented 9 years ago

I haven't tested this, but in reviewing the code I am concerned with this line:

if lookup_type == 'exact' and not value:

In that block it says not to use value=False and to use value=None instead. However, it looks like passing in None will trigger that block, too:

$ ipython
In [1]: not None
Out[1]: True

In [2]: not False
Out[2]: True

Thoughts?