Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed bug in admin: raw_id_admin fields weren't displaying their old …

…values next to the form field, due to descriptor-fields change

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2b551dec408dae44f3e9a75a3e7fe2128cc4bd52 1 parent c6750ac
Adrian Holovaty authored May 04, 2006

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/admin/views/main.py
4  django/contrib/admin/views/main.py
@@ -143,9 +143,9 @@ def existing_display(self):
143 143
             return self._display
144 144
         except AttributeError:
145 145
             if isinstance(self.field.rel, models.ManyToOneRel):
146  
-                self._display = getattr(self.original, 'get_%s' % self.field.name)()
  146
+                self._display = getattr(self.original, self.field.attname)
147 147
             elif isinstance(self.field.rel, models.ManyToManyRel):
148  
-                self._display = ", ".join([str(obj) for obj in getattr(self.original, 'get_%s_list' % self.field.rel.singular)()])
  148
+                self._display = ", ".join([str(obj) for obj in getattr(self.original, self.field.attname).all()])
149 149
             return self._display
150 150
 
151 151
     def __repr__(self):

0 notes on commit 2b551de

Please sign in to comment.
Something went wrong with that request. Please try again.