title: Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x000002523CE84E48>>": "Balance.user" must be a "User" instance
body: <p>I'm working on the Wallet Balance ASPECT of my django website. I want a situation where as soon as new user registers on the website his wallet balance is set to '0', But my code is throwing the above error. Kindly assist.</p>
  
  <p><strong>VIEW</strong> </p>
  
  <pre><code>@unauthenticated_user
  def registration(request):
  
      form = CreateUserForm()
      if request.method == 'POST':
          form = CreateUserForm(request.POST)
          if form.is_valid():
              user = form.save()
              username = form.cleaned_data.get('username')
  
              group = Group.objects.get(name='customer')
              user.groups.add(group)
              Customer.objects.create(
                  user=user,
                  name=user.username,
              )
  
              instance = Balance(user=request.user, balance=10)
              instance.save()
              messages.success(request, 'Account was created for ' + username)
  
              return redirect('loginuser')
  
      context = {'form': form}
      return render(request, 'account/registration.html', context)
  </code></pre>
  
  <p><strong>MODEL</strong></p>
  
  <pre><code>class Balance(models.Model):
      user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
      balance = models.IntegerField()
  
      def __str__(self):
          return str(self.user) if self.user else ''
  </code></pre>
  
  <p><strong>TRACEBACK</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\ienovo\Domination\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
      response = get_response(request)
    File "C:\Users\ienovo\Domination\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "C:\Users\ienovo\Domination\venv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "C:\Users\ienovo\Domination\accounts\decorators.py", line 12, in wrapper_func
      return view_func(request, *args, **kwargs)
    File "C:\Users\ienovo\Domination\accounts\views.py", line 64, in registration
      instance = Balance(user=request.user, balance=10)
    File "C:\Users\ienovo\Domination\venv\lib\site-packages\django\db\models\base.py", line 482, in __init__
      _setattr(self, field.name, rel_obj)
    File "C:\Users\ienovo\Domination\venv\lib\site-packages\django\db\models\fields\related_descriptors.py", line 219, in __set__
      self.field.remote_field.model._meta.object_name,
  
  Exception Type: ValueError at /registration/
  Exception Value: Cannot assign "&lt;SimpleLazyObject: &lt;django.contrib.auth.models.AnonymousUser object at 0x000002523CE84E48&gt;&gt;": "Balance.user" must be a "User" instance.
  </code></pre>