invalid object_id string default to 0

This commit is contained in:
Sanj 2012-06-24 17:18:02 +05:30
parent 53d93b318c
commit 48ecce9c31

View File

@ -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 = []