Feature 2373- move widgets to all locations #2511
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Made
Moved the following widgets from
road_segment_widgets
toall_location_widgets
:killed_and_injured_count_per_age_group
killed_and_injured_count_per_age_group_stacked
injured_count_by_severity
Fixed the
/api/infographics-data
endpoint'snews_flash_id
argument (reflects the update in the Swagger documentation).Resolved a bug in the histogram within the
killed_and_injured_count_per_age_group
widget. Previously, when there were no accidents with the "unknown" type, the widgets crashed. This issue can be observed in the production logs. For instance, the following API call was successful:However, the same API call with a 3-year parameter instead of 5 resulted in a crash:
The issue arises when there are no accidents with an "unknown" type within the last 3 years, as all the accident ages are known during that period.