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

BaseTable should not clear existing prefetched data from QuerySet #9261

Closed
jeremystretch opened this issue Apr 29, 2022 · 0 comments
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user

Comments

@jeremystretch
Copy link
Member

Proposed Changes

Remove the automatic clearing of pre-prefetched QuerySet data (i.e. prefetch_related(None)) from BaseTable initialization. This will ensure that any prefetched data already applied to the QuerySet is retained.

Justification

Under some circumstances, it may be desirable to prefetch additional data that is not automatically detected by the table. There is no real benefit to prohibiting this.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user labels Apr 29, 2022
@jeremystretch jeremystretch self-assigned this Apr 29, 2022
jeremystretch added a commit that referenced this issue Apr 29, 2022
… calls to prefetch_related() on its queryset
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

1 participant