magic-removal: Fixed bug in django.core.management.validate -- it used get_model_module
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2e9a29c307
commit
13edf04d6c
|
@ -691,8 +691,7 @@ def get_validation_errors(outfile):
|
|||
try:
|
||||
f = opts.get_field(fn)
|
||||
except models.FieldDoesNotExist:
|
||||
klass = opts.get_model_module().Klass
|
||||
if not hasattr(klass, fn) or not callable(getattr(klass, fn)):
|
||||
if not hasattr(mod, fn) or not callable(getattr(mod, fn)):
|
||||
e.add(opts, '"admin.list_display" refers to %r, which isn\'t a field or method.' % fn)
|
||||
else:
|
||||
if isinstance(f, models.ManyToManyField):
|
||||
|
|
Loading…
Reference in New Issue