mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Renamed the param to avoid shadowing
This commit is contained in:
@@ -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])
|
||||||
|
|||||||
Reference in New Issue
Block a user