We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b428dfa + 340c6d6 commit e63ac69Copy full SHA for e63ac69
1 file changed
app/core/util/thread_local.py
@@ -21,7 +21,7 @@ def get_request() -> HttpRequest | None:
21
22
23
def get_current_user() -> "UserExt" | None:
24
- if request := get_request():
+ if (request := get_request()) and hasattr(request, "user") and getattr(request.user, "is_authenticated", False):
25
return request.user
26
27
if UserExt := getattr(importlib.import_module("user.models"), "UserExt", None):
0 commit comments