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
Nautobot version (Docker tag too if applicable): 1.6.0rc1
Steps to Reproduce
Log in to Nautobot
In one tab, open the /dcim/devices/ list view, open the Filter modal, and switch to the Advanced tab.
In another browser tab, open the "run" view for a Job that defines a ChoiceVar. Observe that the ChoiceVar is correctly represented as a single-value Select2 widget in the UI.
In the first tab, in the Filter modal, select "Rack Face" in the first column, then "exact" in the second column.
Refresh the second tab.
Expected Behavior
No change on page refresh
Observed Behavior
The ChoiceVar now gets incorrectly rendered as a multi-value Select2 widget.
This is due to incorrect code in get_filterset_parameter_form_field() which is inadvertently modifying the forms.ChoiceField class directly instead of only changing a single instance of that class.
The text was updated successfully, but these errors were encountered:
Workaround to temporarily "unbreak" the Job form after this issue is encountered:
Navigate again to /dcim/devices, open the Filter modal, and switch to the Advanced tab.
Select "Has a primary IP" and then select "exact"
Refresh the job tab.
This is because there's a second code path that also incorrectly modifies forms.ChoiceField when making a different kind of selection from the advanced filter form; we're just lucky in that this code path modifies it to somewhat closer to the original, desired behavior of the form field. Both code paths will be fixed in #4223.
Environment
Steps to Reproduce
/dcim/devices/
list view, open theFilter
modal, and switch to theAdvanced
tab.ChoiceVar
. Observe that the ChoiceVar is correctly represented as a single-value Select2 widget in the UI.Expected Behavior
No change on page refresh
Observed Behavior
The
ChoiceVar
now gets incorrectly rendered as a multi-value Select2 widget.This is due to incorrect code in
get_filterset_parameter_form_field()
which is inadvertently modifying theforms.ChoiceField
class directly instead of only changing a single instance of that class.The text was updated successfully, but these errors were encountered: