Features: 1) Add request, *args, and **kwargs parameters to confirm_password_reset method for compatibility.
Fixes: 1) Adjust password reset serializer to use `request.data` instead of `self.request.data`; 2) Remove unnecessary language scoping from category query. Extra: None;
This commit is contained in:
parent
bc12dcf35c
commit
e1c7197d49
2 changed files with 3 additions and 3 deletions
|
|
@ -140,7 +140,7 @@ class CategoryType(DjangoObjectType):
|
|||
if depth <= 0:
|
||||
return Category.objects.none()
|
||||
|
||||
categories = Category.objects.language(info.context.locale).filter(parent=self)
|
||||
categories = Category.objects.filter(parent=self)
|
||||
if info.context.user.has_perm("core.view_category"):
|
||||
return categories
|
||||
return categories.filter(is_active=True)
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ class UserViewSet(
|
|||
|
||||
@action(detail=False, methods=["post"])
|
||||
@method_decorator(ratelimit(key="ip", rate="2/h" if not DEBUG else "888/h"))
|
||||
def confirm_password_reset(self):
|
||||
def confirm_password_reset(self, request, *args, **kwargs):
|
||||
try:
|
||||
data = ConfirmPasswordResetSerializer(self.request.data).data
|
||||
data = ConfirmPasswordResetSerializer(request.data).data
|
||||
|
||||
if not compare_digest(data.get("password"), data.get("confirm_password")):
|
||||
return Response(
|
||||
|
|
|
|||
Loading…
Reference in a new issue