diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py index 3e5cca169d..b13518c503 100644 --- a/django/core/meta/fields.py +++ b/django/core/meta/fields.py @@ -596,7 +596,10 @@ class ForeignKey(Field): Field.__init__(self, **kwargs) def get_manipulator_field_objs(self): - return [formfields.IntegerField] + if self.rel.raw_id_admin: + return self.rel.get_related_field().get_manipulator_field_objs() + else: + return [formfields.IntegerField] class ManyToManyField(Field): def __init__(self, to, **kwargs):