You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an Admin creates a Profile Key Metric and uses a dataset that is not for the same geography hierarchy the code breaks.
In the example I found Youth Explorer has the Profile Key Metric Population which uses the dataset Population Demographics and the variable Population.
The Profile YE uses the GeographyHierarchy 2011 SA Boundaries but the dataset uses the GeographyHierarchy SA 2011/2016 mix
So when we try to get the profile key metric for a 2011 geography we cannot find the IndicatorDataItems for this geography because it does not exists.
When an Admin creates a Profile Key Metric and uses a dataset that is not for the same geography hierarchy the code breaks.
In the example I found Youth Explorer has the Profile Key Metric Population which uses the dataset Population Demographics and the variable Population.
The Profile YE uses the GeographyHierarchy 2011 SA Boundaries but the dataset uses the GeographyHierarchy SA 2011/2016 mix
So when we try to get the profile key metric for a 2011 geography we cannot find the IndicatorDataItems for this geography because it does not exists.
before the data change we kind off checked if the data exists before trying to access it (756ce9a#diff-1b0927ea32f3ab3d70c8c2053e7db9f5014219fbbf5a13eeccb42167c34561a2L32) but now we don't.
https://production.wazimap-ng.openup.org.za/admin/profile/profilekeymetrics/61/change/?_changelist_filters=profile__name%3DYouth%2BExplorer
https://production.wazimap-ng.openup.org.za/admin/datasets/dataset/123/change/?_changelist_filters=q%3DPopulation
Sentry error:
https://sentry.io/organizations/openupsa/issues/2327735278/?project=5257787&query=is%3Aunresolved&statsPeriod=90d
Before:
After:
https://github.com/OpenUpSA/wazimap-ng/blob/master/wazimap_ng/profile/serializers/metrics_serializer.py#L18-L20
Staging area (0.13 cont)
https://trello.com/c/ppvREW9f/758-bug-key-metrics-wrong-geography-for-dataset
The text was updated successfully, but these errors were encountered: