johnamdickson / portfolio-project-5

1 stars 1 forks source link

BUG: 500 Server Error - user id #87

Closed johnamdickson closed 6 months ago

johnamdickson commented 6 months ago

Epic:

Fine tuning site styling, code and admin #43 **Bug Description:** Encountered the following 500 server error `Field 'id' expected a number but got >` **Actions to Resolve:** I had recently refactored the checkout app views file, specifically the instantiation of user profiles and checking if data exists. However, the try except block for checking if there was user profile existed outside check that user is authenticated. The error was caused when looking for an user id where none existed with anon user, raising a TypeError. I resolved this by including a TypeError clause.