From d9b5a78b36729bdb3ce11c8626d00b57555fb356 Mon Sep 17 00:00:00 2001 From: winkidney Date: Fri, 22 Feb 2019 12:01:46 +0800 Subject: [PATCH] Refactor: Allow only the user-data fetching --- core/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views.py b/core/views.py index 3462c75..4cdbcff 100644 --- a/core/views.py +++ b/core/views.py @@ -9,7 +9,7 @@ from core.permissions import IsOwnerOrReadOnly from users.models import User -class UserViewSet(viewsets.ModelViewSet): +class UserViewSet(mixins.RetrieveModelMixin, GenericViewSet): queryset = User.objects.all() serializer_class = api.UserSerializer