You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the search box in Devices; select a None value from a dropdown (Tenant, Rack Group, Rack all have this value in the demo)
Also select other values in other fields, values do not matter
Perform search
Expected Behavior
All explicitly selected values should remain for a subsequent search.
Observed Behavior
Only values != None were retained, all None values are stripped from previously populated form.
NOTE:
Per discussion with Jathan, this is happening because of the value None is being interpreted as the null value when passed through the JS form rendering. This is expected behavior for the JS rendering but unexpected behavior for the application.
A solution that was tested is that any field that may contain the default value None, would have a companion field instead of containing the value. Examples are "Has console ports" and "Has console server ports" so that a boolean value could be used in place of the default null value.
The text was updated successfully, but these errors were encountered:
This is an interesting side effect from the way that query parameters that come through in the URL get passed into the UI filter form. So rack_id=null for example gets rendered in the form as rack_id=None which the filter interprets as None the Python object and not "None" the string.
This is in fact working as originally designed by having a null_option="None" argument on such fields, for example:
The problem as we determined is that this behavior is surprising and not easily fixable without either eliminating the null option, or fixing the reversible nature of the UI filter query generated by the filter form. The query filter does actually work, it's just that such field values do not get repopulated in the filter form in the UI, causing the confusion.
Environment
Steps to Reproduce
None
value from a dropdown (Tenant, Rack Group, Rack all have this value in the demo)Expected Behavior
All explicitly selected values should remain for a subsequent search.
Observed Behavior
Only values
!= None
were retained, allNone
values are stripped from previously populated form.NOTE:
Per discussion with Jathan, this is happening because of the value
None
is being interpreted as thenull
value when passed through the JS form rendering. This is expected behavior for the JS rendering but unexpected behavior for the application.A solution that was tested is that any field that may contain the default value
None
, would have a companion field instead of containing the value. Examples are "Has console ports" and "Has console server ports" so that a boolean value could be used in place of the defaultnull
value.The text was updated successfully, but these errors were encountered: