aboutsummaryrefslogtreecommitdiff
path: root/middleware
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-08-30 21:54:56 -0400
committerBobby <[email protected]>2024-08-30 21:54:56 -0400
commitd9afb9cdb921211e2844aac127a6dad1ce79fd5c (patch)
treec762a157412760d5f080ce7bb862d00d499a8917 /middleware
parentf362d5a228a06e96c0752718707652e7d36d2456 (diff)
downloadyugen-d9afb9cdb921211e2844aac127a6dad1ce79fd5c.tar.xz
yugen-d9afb9cdb921211e2844aac127a6dad1ce79fd5c.zip
auth fix
Diffstat (limited to 'middleware')
-rw-r--r--middleware/authentication.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/middleware/authentication.py b/middleware/authentication.py
index 7bd8a93..298c960 100644
--- a/middleware/authentication.py
+++ b/middleware/authentication.py
@@ -58,7 +58,7 @@ class AuthMiddleware:
)
# update user object
- request.user.usrname = user["username"]
+ request.user.usrname = user["username"] if user["username"] else user["username"]
request.user.discord_global_name = user["global_name"]
request.user.discord_guild_name = user["guild_name"]
request.user.save()