Renamed the param to avoid shadowing

This commit is contained in:
Martyn Inglis
2016-08-18 15:29:56 +01:00
parent ede7d0cbea
commit 9eb559d4b2

View File

@@ -34,13 +34,13 @@ def get_template_statistics_for_service_by_day(service_id):
limit_days = None limit_days = None
stats = dao_get_template_usage(service_id, limit_days=limit_days) stats = dao_get_template_usage(service_id, limit_days=limit_days)
def serialize(row): def serialize(data):
return { return {
'count': row.count, 'count': data.count,
'day': str(row.day), 'day': str(data.day),
'template_id': str(row.template_id), 'template_id': str(data.template_id),
'template_name': row.name, 'template_name': data.name,
'template_type': row.template_type 'template_type': data.template_type
} }
return jsonify(data=[serialize(row) for row in stats]) return jsonify(data=[serialize(row) for row in stats])