GBLS / docassemble-MACourts

List Massachusetts Courts in Docassemble
MIT License
5 stars 11 forks source link

Allow developer to get a court by its court code #26

Closed plocket closed 4 years ago

plocket commented 4 years ago

Test:

  1. Run docassemble/MACourts/data/questions/test_get_court_by_code.yml.
  2. Enter the court code of a court you're familiar with.
  3. See the resulting name on the next page.
plocket commented 4 years ago

I don't know this thing of which you speak, but I will look it up.

plocket commented 4 years ago

Also, can't believe I didn't test the empty case. Sheesh.

plocket commented 4 years ago

There, that should have a more sensical and handleable failure case.

nonprofittechy commented 4 years ago

Great. I keep next() and .get() in my toolbox to deal with empty lists/other iterators. As nice as Python is, dealing with None requires defensive programming :)

nonprofittechy commented 4 years ago

Accepted with changes. Thanks, this is very helpful