From 9eb559d4b236be5c57927dee4bebed9d47e39a51 Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Thu, 18 Aug 2016 15:29:56 +0100 Subject: [PATCH] Renamed the param to avoid shadowing --- app/template_statistics/rest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/template_statistics/rest.py b/app/template_statistics/rest.py index 3b25b4340..c044eb70e 100644 --- a/app/template_statistics/rest.py +++ b/app/template_statistics/rest.py @@ -34,13 +34,13 @@ def get_template_statistics_for_service_by_day(service_id): limit_days = None stats = dao_get_template_usage(service_id, limit_days=limit_days) - def serialize(row): + def serialize(data): return { - 'count': row.count, - 'day': str(row.day), - 'template_id': str(row.template_id), - 'template_name': row.name, - 'template_type': row.template_type + 'count': data.count, + 'day': str(data.day), + 'template_id': str(data.template_id), + 'template_name': data.name, + 'template_type': data.template_type } return jsonify(data=[serialize(row) for row in stats])