Fixed call to queryset object for Django >= 1.7

master
Brandon Taylor 2014-11-03 10:43:13 -05:00
parent 13945375f1
commit d332563e27
1 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,9 @@ class SortableAdminBase(object):
object_tools block to take people to the view to change the sorting.
"""
if get_is_sortable(self.queryset(request)):
qs_method = getattr(self, 'get_queryset', self.queryset)
if get_is_sortable(qs_method(request)):
self.change_list_template = \
self.sortable_change_list_with_sort_link_template
self.is_sortable = True