Merge pull request #406 from gabriel-sevecek/master

Fix context-dependent filtering example in docs
This commit is contained in:
Syrus Akbary 2018-03-14 23:28:07 -07:00 committed by GitHub
commit 8151fe75b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,4 +145,4 @@ pre-filter animals owned by the authenticated user (set in ``context.user``).
@property
def qs(self):
# The query context can be found in self.request.
return super(AnimalFilter, self).filter(owner=self.request.user)
return super(AnimalFilter, self).qs.filter(owner=self.request.user)