From d192236a3dcb5ed953db19cf37604e3054a2dc0f Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Wed, 3 Dec 2008 15:47:19 +0000 Subject: [PATCH] Fixed regression introduced in r9550 git-svn-id: http://code.djangoproject.com/svn/django/trunk@9563 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/validation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/contrib/admin/validation.py b/django/contrib/admin/validation.py index 63be20f504..ccade8a3ef 100644 --- a/django/contrib/admin/validation.py +++ b/django/contrib/admin/validation.py @@ -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."