-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix AttributeError when using optimizer and prefetch_related (#533)
* Add a test capturing the failure * Short-circuit when a queryset has been sliced There are several places in the codebase where qs._result_cache is evaluated. If a QuerySet has been sliced (e.g., prefetched with pagination in DjangoOptimizerExtension), it has been evaluated as a list and will not have the `_result_cache` attrib. * Update test to verify short-circuiting works as expected
- Loading branch information
1 parent
971231b
commit bebf21a
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters