From 48ecce9c3172ae02447532daae312876a0a443b6 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 24 Jun 2012 17:18:02 +0530 Subject: [PATCH] invalid object_id string default to 0 --- itf/insidepages/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/itf/insidepages/views.py b/itf/insidepages/views.py index 7584d0a..ec14dbe 100755 --- a/itf/insidepages/views.py +++ b/itf/insidepages/views.py @@ -28,7 +28,11 @@ def render_object(request, module_slug): model_class = tab.model_class() #Get various options from GET params - object_id = request.GET.get("object_id", 0) + try: + object_id = int(request.GET.get("object_id", 0)) + except: + object_id = 0 + sortString = request.GET.get("sort", "") if sortString == "" or sortString == 'null': sortArray = []