From 340c6d6901ee5c190bb66c50d1e18fb624ee2bf8 Mon Sep 17 00:00:00 2001 From: MUsoftware Date: Wed, 4 Jun 2025 08:23:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EC=9D=80=20=EC=9C=A0=EC=A0=80=EA=B0=80=20?= =?UTF-8?q?=EC=9A=94=EC=B2=AD=EC=9D=84=20=EC=A7=84=ED=96=89=20=EC=A4=91?= =?UTF-8?q?=EC=9D=B8=20=EC=83=81=ED=99=A9=EC=97=90=EC=84=9C=EB=8A=94=20cre?= =?UTF-8?q?ate=20/=20update=20=EC=8B=9C=20None=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=ED=95=98=EB=8F=84=EB=A1=9D=20get=5Fcurrent?= =?UTF-8?q?=5Fuser=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/util/thread_local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/core/util/thread_local.py b/app/core/util/thread_local.py index 655e590..b6d48b1 100644 --- a/app/core/util/thread_local.py +++ b/app/core/util/thread_local.py @@ -21,7 +21,7 @@ def get_request() -> HttpRequest | None: def get_current_user() -> "UserExt" | None: - if request := get_request(): + if (request := get_request()) and hasattr(request, "user") and getattr(request.user, "is_authenticated", False): return request.user if UserExt := getattr(importlib.import_module("user.models"), "UserExt", None):