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:
Adrian Holovaty 2005-12-15 00:01:51 +00:00
parent 2e9a29c307
commit 13edf04d6c
1 changed files with 1 additions and 2 deletions

View File

@ -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):