Browse files

Fixed regression introduced in r9550

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a44d0aa commit d192236a3dcb5ed953db19cf37604e3054a2dc0f @spookylukey spookylukey committed Dec 3, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/contrib/admin/
@@ -36,6 +36,8 @@ def validate(cls, model):
except models.FieldDoesNotExist:
raise ImproperlyConfigured("%s.list_display[%d], %r is not a callable or an attribute of %r or found in the model %r."
% (cls.__name__, idx, field, cls.__name__, model._meta.object_name))
+ else:
+ # getattr(model, field) could be an X_RelatedObjectsDescriptor
f = fetch_attr(cls, model, opts, "list_display[%d]" % idx, field)
if isinstance(f, models.ManyToManyField):
raise ImproperlyConfigured("'%s.list_display[%d]', '%s' is a ManyToManyField which is not supported."

0 comments on commit d192236

Please sign in to comment.