Fixed regression introduced in r9550
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a44d0aace3
commit
d192236a3d
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue