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

haystack viewset is returning empty results with limit and offset pagination #63

Closed
karimamer opened this issue Jun 30, 2016 · 3 comments

Comments

@karimamer
Copy link

i have this view

class AppSearchView(HaystackViewSet, ProtectedResourceView):
    pagination_class = LimitOffsetPagination
    serializer_class = AppindexSerializer
    max_limit = 50
    index_models = [App]

and i am querying using this url but the result is always empty but if i remove offset and limit from the url i get the results
127.0.0.1:8001/v1/App/search/?offset=&limit=20

{
  "count": 0,
  "next": null,
  "previous": null,
  "results": []
}
@rhblind
Copy link
Owner

rhblind commented Jun 30, 2016

Are you using the latest v1.6.0rc3 version?

@rhblind
Copy link
Owner

rhblind commented Jun 30, 2016

I'm unable to reproduce this, can you try to remove the ProtectedResourceView and try again?

@karimamer
Copy link
Author

@rhblind I removed ProtectedResourceView and upgraded and it worked thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants