From 6f9a8329640d7de49c3c64b6e0e74770f61cefb4 Mon Sep 17 00:00:00 2001 From: Alice Date: Sun, 17 Sep 2017 18:33:57 +0200 Subject: [PATCH] Add country comment to the API --- lambdainst/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lambdainst/views.py b/lambdainst/views.py index 5a4a01c..c446897 100644 --- a/lambdainst/views.py +++ b/lambdainst/views.py @@ -398,8 +398,9 @@ def api_auth(request): def api_locations(request): def format_loc(cc, l): + msg = ' [%s]' % l['message'] if l['message'] else '' return { - 'country_name': l['country_name'], + 'country_name': l['country_name'] + msg, 'country_code': cc, 'hostname': l['hostname'], 'bandwidth': l['bandwidth'],