Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jnovinger opened this issue Feb 27, 2025 · 0 comments · Fixed by #18763
Closed

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

jnovinger opened this issue Feb 27, 2025 · 0 comments · Fixed by #18763
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jnovinger
Copy link
Contributor

jnovinger commented Feb 27, 2025

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?
@jnovinger jnovinger added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: needs triage This issue is awaiting triage by a maintainer labels Feb 27, 2025
@jnovinger jnovinger self-assigned this Feb 27, 2025
@jnovinger jnovinger removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant