From 48b91161953ac62d102c6c3fa46caf3d7fd93419 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Fri, 24 Nov 2023 22:18:00 -0800 Subject: [PATCH] Fix to use user rather than user_with_token in authenticated credentials --- src/khoj/configure.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/khoj/configure.py b/src/khoj/configure.py index fc64af0f..022f1395 100644 --- a/src/khoj/configure.py +++ b/src/khoj/configure.py @@ -82,9 +82,7 @@ class UserAuthenticationBackend(AuthenticationBackend): or subscription_state == SubscriptionState.TRIAL.value ) if subscribed: - return AuthCredentials(["authenticated", "subscribed"]), AuthenticatedKhojUser( - user_with_token.user - ) + return AuthCredentials(["authenticated", "subscribed"]), AuthenticatedKhojUser(user) return AuthCredentials(["authenticated"]), AuthenticatedKhojUser(user) return AuthCredentials(["authenticated", "subscribed"]), AuthenticatedKhojUser(user) if len(request.headers.get("Authorization", "").split("Bearer ")) == 2: