mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
newforms-admin: Properly apply ordering in ModelAdmin.queryset.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
be4e86943e
commit
678b9a6f5a
@ -299,7 +299,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||
# TODO: this should be handled by some parameter to the ChangeList.
|
||||
ordering = self.ordering or () # otherwise we might try to *None, which is bad ;)
|
||||
if ordering:
|
||||
qs.order_by(*ordering)
|
||||
qs = qs.order_by(*ordering)
|
||||
return qs
|
||||
|
||||
def get_fieldsets(self, request, obj=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user