From 1c8684ee9280856d20d48ca742018dc34ac79995 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 27 Dec 2020 23:06:25 +0200 Subject: [PATCH] Fix a FIXME. --- etebase_fastapi/test_reset_view.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etebase_fastapi/test_reset_view.py b/etebase_fastapi/test_reset_view.py index 435a56e..73a803e 100644 --- a/etebase_fastapi/test_reset_view.py +++ b/etebase_fastapi/test_reset_view.py @@ -4,7 +4,7 @@ from django.db import transaction from django.shortcuts import get_object_or_404 from fastapi import APIRouter, Request, Response, status -from django_etebase.utils import get_user_queryset +from django_etebase.utils import get_user_queryset, CallbackContext from etebase_fastapi.authentication import SignupIn, signup_save from etebase_fastapi.msgpack import MsgpackRoute @@ -19,8 +19,7 @@ def reset(data: SignupIn, request: Request): return Response("Only allowed in debug mode.", status_code=status.HTTP_400_BAD_REQUEST) with transaction.atomic(): - # XXX-TOM - user_queryset = get_user_queryset(User.objects.all(), None) + user_queryset = get_user_queryset(User.objects.all(), CallbackContext(request.path_params)) user = get_object_or_404(user_queryset, username=data.user.username) # Only allow test users for extra safety if not getattr(user, User.USERNAME_FIELD).startswith("test_user"):