mirror of
https://github.com/django/django.git
synced 2025-06-11 06:29:13 +00:00
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:
|
try:
|
||||||
f = opts.get_field(fn)
|
f = opts.get_field(fn)
|
||||||
except models.FieldDoesNotExist:
|
except models.FieldDoesNotExist:
|
||||||
klass = opts.get_model_module().Klass
|
if not hasattr(mod, fn) or not callable(getattr(mod, fn)):
|
||||||
if not hasattr(klass, fn) or not callable(getattr(klass, fn)):
|
|
||||||
e.add(opts, '"admin.list_display" refers to %r, which isn\'t a field or method.' % fn)
|
e.add(opts, '"admin.list_display" refers to %r, which isn\'t a field or method.' % fn)
|
||||||
else:
|
else:
|
||||||
if isinstance(f, models.ManyToManyField):
|
if isinstance(f, models.ManyToManyField):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user