Bulk-editing of pass-through ports does not save if ports 1 and 2 are selected in the range of ports to edit. If all ports are selected except 1 and 2, changes do save. This occurs with Front and Rear ports.
** This also works if you just randomly select any port in the list, so long as you do not select port 1 or 2.
The expect behavior is that when clicking Apply, the changes I entered would be applied.
Changes were not saved. The same bulk edit page was displayed again without any changes.
I'm not able to reproduce this. This part:
- Browser does not navigate away from the page
suggests to me that it's a browser issue. The "Apply" button is just a regular <button type="submit"> element; there's no Javascript involved.
I see that you've already got a thread going on the mailing list, so I'm going to close this out for now and continue the discussion there. If we find a way to reproduce the behavior, I'll reopen this issue.
Per Brian Candler on the mailing list:
OK, I can reproduce this now!
- pick any device
- add rearports using pattern [1-96]. Defaults for all other fields.
- back at the device, select all rearports (using the checkbox which selects all)
- select Edit
- select type 100 Punch
- click Apply
The page just refreshes.
Per Brian Candler on the mailing list:
OK, I can reproduce this now!
- pick any device
- add rearports using pattern [1-96]. Defaults for all other fields.
- back at the device, select all rearports (using the checkbox which selects all)
- select Edit
- select type 100 Punch
- click Apply
The page just refreshes.
Yes!! That's it!!
Boy that's a weird one. Nice work! Found the issue:
class RearPortBulkEditForm(BootstrapMixin, AddRemoveTagsForm, BulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=Interface.objects.all(),
widget=forms.MultipleHiddenInput()
)
The form is checking the specified primary keys against Interfaces instead of RearPorts.
Sneaky little bugger - I'm glad you found it in the code so quickly!
Fixed this and also added an error dump at the top of the page to hopefully make troubleshooting future bugs easier. Thanks again!