CircuitGroupAssignmentTable FieldError when sorting by member column (GenericForeignKey missing orderable=False) #84

Closed
opened 2026-04-05 16:21:32 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @clovehitch on 3/25/2026

NetBox Edition

NetBox Community

NetBox Version

4.4.10

Python Version

3.12

Steps to Reproduce

  1. Log in as a superuser
  2. Create a Provider, Circuit Type, and Circuit
  3. Create a Circuit Group
  4. Create a Circuit Group Assignment (member type: Circuit, member: the circuit created above)
  5. Create a non-superuser with staff status
  6. Create an object permission granting view on circuits | circuit group assignment and assign it to the user
  7. Log in as the non-superuser
  8. Navigate to /circuits/circuit-group-assignments/
  9. Click the "Circuit" column header to sort by it
  10. 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 95d0ca56a (PR #19600 / #19487), but CircuitGroupAssignmentTable was not included in that fix.

*Originally created by @clovehitch on 3/25/2026* ### NetBox Edition NetBox Community ### NetBox Version 4.4.10 ### Python Version 3.12 ### Steps to Reproduce 1. Log in as a superuser 2. Create a Provider, Circuit Type, and Circuit 3. Create a Circuit Group 4. Create a Circuit Group Assignment (member type: Circuit, member: the circuit created above) 5. Create a non-superuser with staff status 6. Create an object permission granting view on circuits | circuit group assignment and assign it to the user 7. Log in as the non-superuser 8. Navigate to /circuits/circuit-group-assignments/ 9. Click the "Circuit" column header to sort by it 10. 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 95d0ca56a (PR #19600 / #19487), but CircuitGroupAssignmentTable was not included in that fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#84