forked from 0x2620/pandora
check that range is [int, int]
This commit is contained in:
parent
e536dcb3b0
commit
f0b8b2b81e
2 changed files with 3 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -25,3 +25,4 @@ static/django_extensions
|
|||
*.pyc
|
||||
*~
|
||||
*.swp
|
||||
pandora/gunicorn_config.py
|
||||
|
|
|
@ -84,6 +84,8 @@ def parse_query(data, user):
|
|||
for key in ('sort', 'keys', 'group', 'range', 'position', 'positions'):
|
||||
if key in data:
|
||||
query[key] = data[key]
|
||||
if [r for r in query['range'] if not isinstance(r, int)]:
|
||||
query['range'] = [0, 0]
|
||||
query['qs'] = models.Item.objects.find(data, user)
|
||||
if 'clips' in data:
|
||||
conditions = {'query': data['clips']['query']}
|
||||
|
|
Loading…
Reference in a new issue