Skip to content

Commit

Permalink
Discord auth bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dssecret committed Nov 15, 2023
1 parent 8d506b1 commit b85dff9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions controllers/authroutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,7 @@ def skynet_login():
user_request.raise_for_status()
user_data = user_request.json()

user: typing.Optional[AuthUser]
try:
user = AuthUser.get(User.discord_id == user_data["id"])
except DoesNotExist:
user = None
user: typing.Optional[AuthUser] = AuthUser.select().where(User.discord_id == user_data["id"]).first()

if user is None:
try:
Expand Down

0 comments on commit b85dff9

Please sign in to comment.