ideafast / middleware-services

Python API containing endpoints for smartphone hub applications and transfer to data portal
0 stars 0 forks source link

Use None when serializing inventory response #86

Closed jawrainey closed 3 years ago

jawrainey commented 3 years ago

Detailed outlined in #85, but in brief we're trying to access attributes of a dictionary that doesn't exist (it's None).

To reproduce error

  1. git checkout master
  2. poetry run consumer
  3. Visit http://0.0.0.0:8000/inventory/devices/bytype/8 and observe Internal Server Error

Solution

To see the change checkout this branch, run tests (I've added a new test to confirm this bug), and navigate to the above URL. All should be fine. Closes #85