fix: async pagination evaluate fix for queryset object #1354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello guys, you are doing a great job!
I found a problem using default
PageNumberPagination
with async endpoint returning a queryset like this:I was getting that error about calling sync method, so I made a small change in your
PageNumberPagination
andLimitOffsetPagination
.It was not a big change, I also adjusted your tests and everything is working just fine.
The reason why the error was being raised is the same as if count was called in async loop, so that change was really needed.
I don't hope you to merge my pull request, but that change is really needed and you should merge it to properly work with
QuerySet
object.