Skip to content

Commit

Permalink
Fixes #18758: Enable sorting by Account count on prodiver list (#18763)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnovinger authored Feb 28, 2025
1 parent 7aba650 commit 09d867a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion netbox/circuits/tables/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class ProviderTable(ContactsColumnMixin, NetBoxTable):
verbose_name=_('Accounts')
)
account_count = columns.LinkedCountColumn(
accessor=tables.A('accounts__count'),
viewname='circuits:provideraccount_list',
url_params={'provider_id': 'pk'},
verbose_name=_('Account Count')
Expand Down
1 change: 1 addition & 0 deletions netbox/circuits/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ProviderListView(generic.ObjectListView):
queryset = Provider.objects.annotate(
count_circuits=count_related(Circuit, 'provider'),
asn_count=count_related(ASN, 'providers'),
account_count=count_related(ProviderAccount, 'provider'),
)
filterset = filtersets.ProviderFilterSet
filterset_form = forms.ProviderFilterForm
Expand Down

0 comments on commit 09d867a

Please sign in to comment.