Properly reference FieldDoesNotExist as it does not exist in global of django/contrib/admin/options.py.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner 2008-08-29 19:50:22 +00:00
parent 21adbd6738
commit 5c31c68560
1 changed files with 1 additions and 1 deletions

View File

@ -509,7 +509,7 @@ class ModelAdmin(BaseModelAdmin):
for k in initial: for k in initial:
try: try:
f = opts.get_field(k) f = opts.get_field(k)
except FieldDoesNotExist: except models.FieldDoesNotExist:
continue continue
if isinstance(f, models.ManyToManyField): if isinstance(f, models.ManyToManyField):
initial[k] = initial[k].split(",") initial[k] = initial[k].split(",")