Skip to content

Conversation

@jnovinger
Copy link
Member

Fixes: #18594 - Site list can now be sorted by the asn_count column

Changes:

  • adds asn_count annotation
  • removes now unnecessary accessor argument for asn_count column

@jnovinger jnovinger requested a review from bctiemann February 12, 2025 20:16
Copy link
Contributor

@bctiemann bctiemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProviderListView needs this same fix.

@jeremystretch
Copy link
Member

@jnovinger could you please apply the same fix for the asn_count column on circuits.tables.ProviderTable?

@jnovinger
Copy link
Member Author

@jnovinger could you please apply the same fix for the asn_count column on circuits.tables.ProviderTable?

Fix committed, looking to see what testing opportunities we might have.

@jnovinger
Copy link
Member Author

Fix committed, looking to see what testing opportunities we might have.

Looks like we don't currently have any tests for various table subclasses, outside of one small example. While I think it's worthwhile to add tests, seems like it might be outside the scope for this ticket, especially since the change in behavior is not using an in-house customization. @jeremystretch , thoughts?

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extending the test scope would be outside of this particular PR. Thanks @jnovinger!

@jeremystretch jeremystretch merged commit 2a44aff into netbox-community:main Feb 20, 2025
3 checks passed
@jnovinger jnovinger deleted the 18594-fix-asn_count-ordering branch February 25, 2025 14:58
bctiemann pushed a commit that referenced this pull request Mar 6, 2025
* Fixes #18594: asn_count sort in Sites list

* Fixes similar issue in `circuits.views.ProviderListView`

Thanks @bctiemann for point this out!
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 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.

Cannot Sort By asn_count Column For Sites Table And Providers View Table

3 participants