Fixed #586 -- Fixed bug in raw_id_admin caused by [785]. Thanks for the heads-up, slashzero

git-svn-id: http://code.djangoproject.com/svn/django/trunk@800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-10-07 23:39:06 +00:00
parent 9f7e2f38dd
commit d93c68ab5f
1 changed files with 3 additions and 2 deletions

View File

@ -596,8 +596,9 @@ class ForeignKey(Field):
Field.__init__(self, **kwargs) Field.__init__(self, **kwargs)
def get_manipulator_field_objs(self): def get_manipulator_field_objs(self):
if self.rel.raw_id_admin: rel_field = self.rel.get_related_field()
return self.rel.get_related_field().get_manipulator_field_objs() if self.rel.raw_id_admin and not isinstance(rel_field, AutoField):
return rel_field.get_manipulator_field_objs()
else: else:
return [formfields.IntegerField] return [formfields.IntegerField]