diff --git a/django/core/formfields.py b/django/core/formfields.py index 167439cc07..facb2b57e2 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.name + self.name = rel_obj.opts.module_name def __len__(self): self.fill()