Fix broken links on template statistics page

Tests assumed that the API returns the template `id` as part of the
object. It doesn’t – it returns it as the key used to look up the
object. The `id` was missing from the transformation into the format
used by the front end.

For some reason Flask is fine building the URL with `template_id=None`,
but obviously this doesn’t generate a valid link.
This commit is contained in:
Chris Hill-Scott
2017-03-20 17:35:01 +00:00
parent a0afe55d3c
commit d1d13c23c5
3 changed files with 3 additions and 1 deletions

View File

@@ -321,6 +321,7 @@ def format_template_stats_to_list(stats_dict):
template['counts'].get(status, 0)
for status in REQUESTED_STATUSES
),
id=template_id,
**template
)