MetricsSerializer breaks for missing subindicator
Opened this issue · 0 comments
adieyal commented
In MetricsSerializer
there is an error when the Subindicator is not available for a specific geography:
wazimap-ng/wazimap_ng/profile/serializers/metrics_serializer.py
Lines 31 to 35 in 06ce11f
If subindicator
is not available this will result in a 500 server error. With KeyError
There are several things that need to happen here:
- create a test for this edge case
- use
.get
instead of[]
- return a default value if the subindicator is missing:
N/A
https://trello.com/c/svbZLvHv/650-absolute-value-calculator-bug