contact-app icon indicating copy to clipboard operation
contact-app copied to clipboard

Fix 500 during contact search; add comments and format files

Open ms opened this issue 2 years ago • 0 comments

Hello, I’m an early reviewer of the book.

A few minor fixes:

  • Searching throws a 500 because some of the mock data has null values. Added a check for None
  • Added a comment about the secret key so people don’t copy paste this line without thinking
  • Ran autopep8 to pretty-format the code on app and contact_model (hopefully that’s the right thing to do, I know even less Python than you say you do)

The first item leads me to ask: how does htmx handle HTTP errors? I didn’t see any indication of something being wrong in the UI (I had to open the devtools and then look at the terminal output).

I only tested searching. I’m happy to split this PR up if you prefer to keep commits more atomic in the repo.

Loving the book so far, great work!

ms avatar Sep 10 '22 17:09 ms