Fixes #21176: Remove checkboxes from IP ranges in mixed-type tables #477

Closed
opened 2026-04-05 16:34:52 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jnovinger on 1/23/2026

Fixes: #21176

When IP addresses and IP ranges are displayed together in a prefix's IP Addresses tab, only IP addresses should be selectable for bulk operations since the bulk delete form doesn't support mixed object types.

  • Override render_pk() in AnnotatedIPAddressTable to conditionally render checkboxes only for the table's primary model type (IPAddress)
  • Add warning comment to add_requested_prefixes() about fake Prefix objects
  • Add regression test to verify IPAddress has checkboxes but IPRange does not
*Originally created by @jnovinger on 1/23/2026* ### Fixes: #21176 When IP addresses and IP ranges are displayed together in a prefix's IP Addresses tab, only IP addresses should be selectable for bulk operations since the bulk delete form doesn't support mixed object types. - Override `render_pk()` in `AnnotatedIPAddressTable` to conditionally render checkboxes only for the table's primary model type (IPAddress) - Add warning comment to `add_requested_prefixes()` about fake Prefix objects - Add regression test to verify IPAddress has checkboxes but IPRange does not
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#477