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
b2545ce8
Commit
b2545ce8
authored
Jul 30, 2015
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9137 from edx/peter-fogg/test-team-list-fix
Revert "Remove unnecessary DB call in team pagination."
parents
48480861
95b8d723
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
8 deletions
+1
-8
lms/djangoapps/teams/views.py
+1
-8
No files found.
lms/djangoapps/teams/views.py
View file @
b2545ce8
...
...
@@ -331,14 +331,7 @@ class TeamsListView(ExpandableFieldViewMixin, GenericAPIView):
queryset
=
queryset
.
order_by
(
order_by_field
)
# TODO: Remove this on update to Django 1.8
# Use the cached length of the queryset in order to avoid
# making an extra database call to get the number of items in
# the collection
paginator
=
self
.
paginator_class
(
queryset
,
self
.
get_paginate_by
())
paginator
.
_count
=
len
(
queryset
)
# pylint: disable=protected-access
page
=
paginator
.
page
(
int
(
request
.
QUERY_PARAMS
.
get
(
'page'
,
1
)))
# end TODO
page
=
self
.
paginate_queryset
(
queryset
)
serializer
=
self
.
get_pagination_serializer
(
page
)
serializer
.
context
.
update
({
'sort_order'
:
order_by_input
})
# pylint: disable=maybe-no-member
return
Response
(
serializer
.
data
)
# pylint: disable=maybe-no-member
...
...
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