invalid object_id string default to 0
This commit is contained in:
parent
53d93b318c
commit
48ecce9c31
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user