diff --git a/zerver/context_processors.py b/zerver/context_processors.py index 2253cdb3c5..d953c762cf 100644 --- a/zerver/context_processors.py +++ b/zerver/context_processors.py @@ -88,7 +88,7 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]: user_is_authenticated = False if hasattr(request, 'user') and hasattr(request.user, 'is_authenticated'): - user_is_authenticated = request.user.is_authenticated.value + user_is_authenticated = request.user.is_authenticated if settings.DEVELOPMENT: secrets_path = "zproject/dev-secrets.conf" diff --git a/zerver/views/home.py b/zerver/views/home.py index f89b71c418..1a0e2e368a 100644 --- a/zerver/views/home.py +++ b/zerver/views/home.py @@ -311,6 +311,6 @@ def plans_view(request: HttpRequest) -> HttpResponse: realm_plan_type = realm.plan_type if realm.plan_type == Realm.SELF_HOSTED and settings.PRODUCTION: return HttpResponseRedirect('https://zulipchat.com/plans') - if not request.user.is_authenticated(): + if not request.user.is_authenticated: return redirect_to_login(next="plans") return render(request, "zerver/plans.html", context={"realm_plan_type": realm_plan_type})