You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accessing feed, stats (leaderboard, achievements), games (quizzes, flashcards), or chat without logging in, a KeyError: 'username' occurs.
This can be fixed by implementing the @login_required annotation with Flask, and hiding these items from the navigation bar when the user isn't logged in.
It may be better to hide the navigation bar entirely when the user isn't logged in.
The text was updated successfully, but these errors were encountered:
Problem Statement
KeyError: 'username'
occurs.@login_required
annotation with Flask, and hiding these items from the navigation bar when the user isn't logged in.The text was updated successfully, but these errors were encountered: