Skip to content

Conversation

@bctiemann
Copy link
Contributor

Fixes: #18406

There is a scope field on several tables that causes a crash when it is selected for sorting:

django.core.exceptions.FieldError: Field 'scope' does not generate an automatic reverse relation and therefore cannot be used for reverse querying. If it is a GenericForeignKey, consider adding a GenericRelation.

This change disables ordering on those fields, which is consistent with the existing behavior of the scope field on VLANGroupTable. It would be more ideal to find a way to sort on this column in all such tables, but since we have precedent for just disabling it this will at least prevent crashes.

@jeremystretch jeremystretch merged commit 07ad4c1 into main Jan 17, 2025
6 checks passed
@jeremystretch jeremystretch deleted the 18406-scope-field-not-orderable branch January 17, 2025 13:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to View IPAM > Prefixes when sorting by SCOPE

3 participants