mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 14:18:24 -04:00
Fix count of columns on breaking change page
For some reason we were rebuilding `new_template` as a dictionary, without the `placeholders` attribute. This meant that we were never actually counting the placeholders, just counting the length of `None` and adding 1 to it. So this commit fixes that, beefs up the tests, and makes sure that everything is pluralised properly.
This commit is contained in:
@@ -262,12 +262,7 @@ def edit_service_template(service_id, template_id):
|
||||
return render_template(
|
||||
'views/templates/breaking-change.html',
|
||||
template_change=template_change,
|
||||
new_template={
|
||||
'name': form.name.data,
|
||||
'subject': subject,
|
||||
'content': form.template_content.data,
|
||||
'id': new_template.id
|
||||
},
|
||||
new_template=new_template,
|
||||
column_headings=list(ascii_uppercase[:len(new_template.placeholders) + 1]),
|
||||
example_rows=[
|
||||
first_column_headings[new_template.template_type] + list(new_template.placeholders),
|
||||
|
||||
Reference in New Issue
Block a user