Filtering on null values for nullable CharFields is broken #2895
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Environment
Steps to Reproduce
facility_id
value:http://netbox/dcim/racks/?facility_id=null
Expected Behavior
Only racks with a null
facility_id
should be returned.Observed Behavior
The filter has no effect. There are two issues at play here.
First, NullableCharFieldFilter is looking for a query parameter of
NULL
rather thannull
as specified in settings.py. Second, ifNULL
is passed, an exception occurs due to the filter using obsolete syntax:self.name
should beself.field_name
.The text was updated successfully, but these errors were encountered: