We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_queryset
1 parent e81ed71 commit 9df9608Copy full SHA for 9df9608
rest_auth/views.py
@@ -3,6 +3,7 @@
3
logout as django_logout
4
)
5
from django.conf import settings
6
+from django.contrib.auth import get_user_model
7
from django.core.exceptions import ObjectDoesNotExist
8
from django.utils.translation import ugettext_lazy as _
9
@@ -130,6 +131,14 @@ class UserDetailsView(RetrieveUpdateAPIView):
130
131
def get_object(self):
132
return self.request.user
133
134
+ def get_queryset(self):
135
+ """
136
+ Adding this method since it is sometimes called when using
137
+ django-rest-swagger
138
+ https://github.com/Tivix/django-rest-auth/issues/275
139
140
+ return get_user_model().objects.none()
141
+
142
143
class PasswordResetView(GenericAPIView):
144
0 commit comments