ValueError Cannot force both insert and updating in model saving.

Raised by:

django/db/models/base.py (line 769)

Traceback (most recent call last):
  File "python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  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.6/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "python3.6/site-packages/django/db/models/query.py", line 482, in update_or_create
    obj, created = self._create_object_from_params(lookup, params)
  File "python3.6/site-packages/django/db/models/query.py", line 498, in _create_object_from_params
    obj = self.create(**params)
  File "python3.6/site-packages/django/db/models/query.py", line 394, in create
    obj.save(force_insert=True, using=self.db)
  File "private.py", line 1, in private_function
    private_function()
  File "python3.6/site-packages/django/db/models/base.py", line 769, in save
    raise ValueError("Cannot force both insert and updating in model saving.")
ValueError: Cannot force both insert and updating in model saving.