Skip to content

Fixes: #18406 - Make GFK scope field sortable=False on tables where it appears #18418

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

Merged
merged 1 commit into from
Jan 17, 2025

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
2 participants