From 4f1113209c9c6a7f005691b58b1e15d388ae4b11 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 19:07:47 +0530 Subject: [PATCH] um, convert incoming GET params to int --- gazetteer/places/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gazetteer/places/views.py b/gazetteer/places/views.py index c08cf62..bc46b1d 100644 --- a/gazetteer/places/views.py +++ b/gazetteer/places/views.py @@ -11,10 +11,10 @@ def search(request): def search_json(request): search_term = request.GET.get("q", "") - threshold = request.GET.get("threshold", 0.5) + threshold = float(request.GET.get("threshold", '0.5')) bbox = request.GET.get("bbox", False) - page = request.GET.get("page", 1) - count = request.GET.get("count", 100) + page = int(request.GET.get("page", '1')) + count = int(request.GET.get("count", '100')) country = request.GET.get("adm0", "US") # right now, unused adm1 = request.GET.get("adm1", "") adm2 = request.GET.get("adm2", "")