Return precompiled_letter flag rather than hidden

This commit is contained in:
Ken Tsang
2018-03-05 18:51:04 +00:00
parent b5a2dbb24e
commit bca858f4a8
3 changed files with 23 additions and 10 deletions

View File

@@ -48,7 +48,11 @@ def get_template_statistics_for_service_by_day(service_id):
'template_id': str(data.template_id),
'template_name': data.name,
'template_type': data.template_type,
'template_hidden': data.hidden
'precompiled_letter': (
data.template_type == 'letter' and
data.hidden and
data.name == current_app.config['PRECOMPILED_TEMPLATE_NAME']
)
}
return jsonify(data=[serialize(row) for row in stats])