Skip to content

Commit

Permalink
fix anonymous user riot account error (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwanok authored Apr 7, 2024
1 parent 874a658 commit 7857209
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions project/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,12 @@ def get_account_by_summoner_name(request: WSGIRequest):
def recommend_ai(request: WSGIRequest):
user: AppUser = request.user

if not user.riot_account:
if not request.user.is_anonymous:
return render(
request,
"recommend/ai.html",
{
"user": user,
"riot_account": None,
"riot_summoner": None,
},
)

Expand Down

0 comments on commit 7857209

Please sign in to comment.