Refactor sort direction use

Replaces redundant call to request

Change-Id: Ib3500b69272604a436428e1c8ed6257fb87d6d78
This commit is contained in:
Omar Shykhkerimov 2016-06-08 19:36:55 +03:00
parent dd2de0b6dd
commit 833193c645

View File

@ -521,7 +521,7 @@ class IndexView(generic_views.PageTitleMixin, list_view.ListView):
marker=marker, page_size=self.paginate_by, sort_dir=sort_dir,
limit=self.paginate_by)
if self.request.GET.get('sort_dir', 'asc') == 'desc':
if sort_dir == 'desc':
packages = list(reversed(packages))
return packages