nautobot
nautobot copied to clipboard
[WIP] Add `__isnull` Lookup Expression via Dynamic `_null` Filter Expression
Closes: #1905
What's Changed
- Adds
null
as a filter expressions that maps to__isnull
as an ORM filter
TODO
- [ ] Explanation of Change(s)
- [ ] Attached Screenshots, Payload Example
- [ ] Unit, Integration Tests
- [ ] Documentation Updates (when adding/changing features)
- [ ] Example Plugin Updates (when adding/changing features)
- [ ] Outline Remaining Work, Constraints from Design
Seems strange to me to be adding __isnull
as a filter on text and numeric filters - generally speaking those type of fields shouldn't be null. I would have thought you'd want to add isnull support to ModelChoiceFilter and ModelMultipleChoiceFilter instead... is this specifically for handling custom fields without default values?
Good catch, will look into changes needed. That was the initial source of the request.
Closed. Tracking stale PRs in #2812.