Skip to content

Commit bce3201

Browse files
committed
fix auth view
1 parent 105aae9 commit bce3201

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

elastic_framework/contrib/auth/views.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from django.db import transaction
55
from django.utils.translation import ugettext as _
66
from django.contrib.auth import get_user_model
7-
from django.shortcuts import get_object_or_404
87
from rest_framework.generics import (GenericAPIView, ListCreateAPIView,
98
RetrieveUpdateAPIView)
109
from rest_framework.response import Response
@@ -114,7 +113,7 @@ def get(self, request, *args, **kwargs):
114113
status=200)
115114

116115
def patch(self, request, *args, **kwargs):
117-
user = self.get_object_or_404()
116+
user = self.get_object()
118117
check_user_is_owner(user, request)
119118
data = request.data
120119
with transaction.atomic():

0 commit comments

Comments
 (0)