AttributeError 'ModelFormOptions' object has no attribute 'label'

Raised by:

django/forms/models.py (line 1028)

Traceback (most recent call last):
  File "python3.5/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "python3.5/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "python3.5/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "private.py", line 1, in private_function
    private_function()
  File "private.py", line 1, in private_function
    private_function()
  File "python3.5/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "python3.5/site-packages/django/views/generic/edit.py", line 236, in get
    return super(BaseUpdateView, self).get(request, *args, **kwargs)
  File "python3.5/site-packages/django/views/generic/edit.py", line 174, in get
    return self.render_to_response(self.get_context_data())
  File "private.py", line 1, in private_function
    private_function()
  File "private.py", line 1, in private_function
    private_function()
  File "private.py", line 1, in private_function
    private_function()
  File "python3.5/site-packages/django/forms/models.py", line 1055, in inlineformset_factory
    fk = _get_foreign_key(parent_model, model, fk_name=fk_name)
  File "python3.5/site-packages/django/forms/models.py", line 1028, in _get_foreign_key
    model._meta.label,
AttributeError: 'ModelFormOptions' object has no attribute 'label'