From 9fb3f7fa932c9214f2b5114e9950529371f93023 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Tue, 23 Aug 2005 20:17:36 +0000 Subject: [PATCH] Fixed a small bug in admin changelist view -- the code that handles ordering by a related field still assumed the outdated ordering syntax. git-svn-id: http://code.djangoproject.com/svn/django/trunk@547 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/admin/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/views/admin/main.py b/django/views/admin/main.py index 907adec31e..c0a177a928 100644 --- a/django/views/admin/main.py +++ b/django/views/admin/main.py @@ -131,7 +131,7 @@ def change_list(request, app_label, module_name): lookup_order_field = order_field if isinstance(lookup_opts.get_field(order_field).rel, meta.ManyToOne): f = lookup_opts.get_field(order_field) - lookup_order_field = '%s.%s' % (f.rel.to.db_table, f.rel.to.ordering[0][0]) + lookup_order_field = '%s.%s' % (f.rel.to.db_table, f.rel.to.ordering[0]) # Use select_related if one of the list_display options is a field with a # relationship. for field_name in lookup_opts.admin.list_display: