Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed #2050 -- Fixed raw_id_admin display in admin. Thanks, Christoph…
…er Lenz

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed May 31, 2006
1 parent a0de8b3 commit 192c726
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/contrib/admin/views/main.py
Expand Up @@ -143,9 +143,9 @@ def existing_display(self):
return self._display return self._display
except AttributeError: except AttributeError:
if isinstance(self.field.rel, models.ManyToOneRel): if isinstance(self.field.rel, models.ManyToOneRel):
self._display = getattr(self.original, self.field.attname) self._display = getattr(self.original, self.field.name)
elif isinstance(self.field.rel, models.ManyToManyRel): elif isinstance(self.field.rel, models.ManyToManyRel):
self._display = ", ".join([str(obj) for obj in getattr(self.original, self.field.attname).all()]) self._display = ", ".join([str(obj) for obj in getattr(self.original, self.field.name).all()])
return self._display return self._display


def __repr__(self): def __repr__(self):
Expand Down

0 comments on commit 192c726

Please sign in to comment.