You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_queryset_post_processor is not applied to querysets in _search. Not sure if this is a bug or there is some reason for this, but it seems odd that the queryset_post_processor is applied to the queryset for list requests, but not when a filter is passed.
E.g., I have a queryset_post_processor which returns qs.filter(username__startswith='test'), and my queryset consists of two users, id 1 has username testuser and id 2 has username nottestuser. If I make a GET /Users request, only user 1 is returned. However, if I make a GET /Users/?filter=userName eq "nottestuser", user 2 is returned. I expected the behaviour to be for the 2nd request to not return any result, as filtering the request should return a subset of the results obtained in the request with no filters.
The text was updated successfully, but these errors were encountered:
Hi @franciscomonsanto, this was an engineering choice. We simply did not need get_queryset_post_processor applied to querysets. If you need such behavior, PRs are welcome but please note that reviews on all PRs are slow to arrive.
get_queryset_post_processor
is not applied to querysets in_search
. Not sure if this is a bug or there is some reason for this, but it seems odd that thequeryset_post_processor
is applied to the queryset for list requests, but not when a filter is passed.E.g., I have a queryset_post_processor which returns
qs.filter(username__startswith='test')
, and my queryset consists of two users, id 1 has usernametestuser
and id 2 has usernamenottestuser
. If I make aGET /Users
request, only user 1 is returned. However, if I make aGET /Users/?filter=userName eq "nottestuser"
, user 2 is returned. I expected the behaviour to be for the 2nd request to not return any result, as filtering the request should return a subset of the results obtained in the request with no filters.The text was updated successfully, but these errors were encountered: