diff --git a/django/core/formfields.py b/django/core/formfields.py index facb2b57e2..167439cc07 100644 --- a/django/core/formfields.py +++ b/django/core/formfields.py @@ -210,7 +210,7 @@ class InlineObjectCollection: self.data = data self.errors = errors self._collections = None - self.name = rel_obj.opts.module_name + self.name = rel_obj.name def __len__(self): self.fill()