mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Fix typo
This commit is contained in:
parent
3b258d69c9
commit
c5765641a4
|
@ -71,7 +71,7 @@ We can override `.get_queryset()` to deal with URLs such as `http://example.com/
|
|||
by filtering against a `username` query parameter in the URL.
|
||||
"""
|
||||
queryset = Purchase.objects.all()
|
||||
username = self.request.QUERY_PARAMS.get('username', None):
|
||||
username = self.request.QUERY_PARAMS.get('username', None)
|
||||
if username is not None:
|
||||
queryset = queryset.filter(purchaser__username=username)
|
||||
return queryset
|
||||
|
|
Loading…
Reference in New Issue
Block a user