Skip to content

FieldError when trying so sort on Account count field in Providers list #18758

@jnovinger

Description

@jnovinger

First discussed in discussion #17020 circuits/provider Error

Deployment Type

Self-hosted

NetBox Version

v4.2.4

Python Version

3.10

Steps to Reproduce

  1. Create one or more Providers (/circuits/providers/add/)
  2. Navigate to Providers list (http://127.0.0.1:8000/circuits/providers/)
  3. Click 'Account count' column in order to sort providers by number of associate accounts

Expected Behavior

List of providers should be sorted based on how many provider accounts are associated with each.

Observed Behavior

FieldError is raised

Image

  File "~/.virtualenvs/netbox/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1423, in try_transform
    raise FieldError(

Exception Type: FieldError at /circuits/providers/
Exception Value: Unsupported lookup 'count' for BigAutoField or join on the field not permitted, perhaps you meant contains?

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions