I have everything on my Blogz assignment complete except when a viewer(someone not signed in) goes into a specific blog and clicks on the user name. It should return back to the user page with all that users blogs but I’m getting a KeyError. What is crazy is that this redirect works when a user is signed in so I know it probably has something to do with my @app.before_request.
My_blogs is the route that is giving me this problem.
Is this an error because there isn’t a user technically signed in? How can I go about fixing it? I’ve made several attempts of creating variables and conditional statements but nothing is working.