-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
NetBox Edition
NetBox Community
NetBox Version
4.4.10
Python Version
3.12
Steps to Reproduce
- Log in as a superuser
- Create a Provider, Circuit Type, and Circuit
- Create a Circuit Group
- Create a Circuit Group Assignment (member type: Circuit, member: the circuit created above)
- Create a non-superuser with staff status
- Create an object permission granting view on circuits | circuit group assignment and assign it to the user
- Log in as the non-superuser
- Navigate to /circuits/circuit-group-assignments/
- Click the "Circuit" column header to sort by it
- Alternatively, navigate directly to /circuits/circuit-group-assignments/?sort=member
Expected Behavior
The table sorts by the Circuit column without error.
Observed Behavior
django.core.exceptions.FieldError: Field 'member' does not generate an automatic reverse relation and therefore cannot be used for reverse querying. If it is a GenericForeignKey, consider adding a GenericRelation.
The sort preference is saved to the user's config, so all subsequent page loads also fail. Superusers are not affected.
The member column on CircuitGroupAssignmentTable is a GenericForeignKey but is missing orderable=False. This is the same bug fixed for CircuitTerminationTable and TunnelTerminationTable in commit 95d0ca5 (PR #19600 / #19487), but CircuitGroupAssignmentTable was not included in that fix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application