Skip to content

Conversation

@pheus
Copy link
Contributor

@pheus pheus commented Sep 5, 2025

Fixes: #19744

Summary
Fix sorting for the Active column on Admin → Plugins.

Change
Add accessor=tables.A('is_loaded') to the Active TemplateColumn so django‑tables2 orders by the boolean value rather than the rendered HTML.

Result
Clicking Active now correctly toggles:

  • Ascending: inactive → active
  • Descending: active → inactive

Adds the `accessor` attribute with `tables.A('is_loaded')` to the
`is_installed` column in the plugin's table. This ensures proper data
access and improves the table's functionality.

Fixes netbox-community#19744
@jeremystretch jeremystretch requested review from a team and bctiemann and removed request for a team September 5, 2025 12:46
@pheus
Copy link
Contributor Author

pheus commented Sep 5, 2025

Alternatively, we could rename the table column to is_loaded. If you prefer that approach, I’m happy to update the PR.

@bctiemann bctiemann merged commit 8ebc677 into netbox-community:main Sep 8, 2025
7 checks passed
@pheus pheus deleted the 19744-fix-active-column-sorting-in-plugin-table branch September 8, 2025 17:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to sort plugins list by Active column

2 participants