Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
032d7e61
Commit
032d7e61
authored
Aug 25, 2014
by
Matt Drayer
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mattdrayer/api-increase-upper-bound: Changed id list boundary from 100 to 800
parent
0929dbac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lms/djangoapps/api_manager/permissions.py
+3
-2
No files found.
lms/djangoapps/api_manager/permissions.py
View file @
032d7e61
...
...
@@ -88,9 +88,10 @@ class IdsInFilterBackend(filters.BaseFilterBackend):
def
filter_queryset
(
self
,
request
,
queryset
,
view
):
"""
Parse querystring to get ids and the filter the queryset
Max of 100 values are allowed for performance reasons
Max of 800 values are allowed for performance reasons
(800 satisfies a specific client integration use case)
"""
upper_bound
=
getattr
(
settings
,
'API_LOOKUP_UPPER_BOUND'
,
1
00
)
upper_bound
=
getattr
(
settings
,
'API_LOOKUP_UPPER_BOUND'
,
8
00
)
ids
=
request
.
QUERY_PARAMS
.
get
(
'ids'
)
if
ids
:
ids
=
ids
.
split
(
","
)[:
upper_bound
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment