title: ValueError: Cannot query "": Must be "User" instance
body: <p>I am trying to create a follower system where user can get to follow investor not between user and user but between user and investor. However I am getting an error.</p>
  
  <p>I am still not sure if i have to create a different table for follow or not but here is the code. Please share your idea for better modelling of follow system between user and investor</p>
  
  <p>from <strong>models.py</strong>:</p>
  
  <pre><code>class Investor(models.Model):
      investor = models.ForeignKey(User, on_delete=models.CASCADE)
      name = models.CharField(max_length=200, blank=False,
                              null=False, help_text='Full Name')
      followers = models.ManyToManyField(
          User, related_name='followers', blank=True)
  
      @classmethod
      def follow_investor(cls, investor, follower):
          investor, created = cls.objects.get_or_create(investor=investor)
          investor.followers.add(follower)
  
      @classmethod
      def unfollow_investor(cls, investor, follower):
          investor, created = cls.objects.get_or_create(investor=investor)
          investor.followers.remove(follower)
  
  
  
  url(r'^investor/(?P&lt;action&gt;.+)/(?P&lt;slug&gt;[-\w]+)$',
      views.follow_unfollow_investor, name="follow-unfollow-investor"),
  
  
  def follow_unfollow_investor(request, action, slug=None):
      follower = request.user
      investor = Investor.objects.get(slug=slug)
      if action == "add":
          Investor.follow_investor(investor, follower)
      elif action == "remove":
          Investor.unfollow_investor(user, follower)
      return redirect('/')
  </code></pre>
  
  <p><strong>UPDATE</strong>
  The User is from django.contrib.auth.models </p>
  
  <p>stack trace</p>
  
  <pre><code>Internal Server Error: /investor/add/milan-raymond
  Traceback (most recent call last):
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/core/handlers/exception.py", line 41, in inner
      response = get_response(request)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/milan/Projects/startup/investors/views.py", line 32, in follow_unfollow_investor
      Investor.follow_investor(investor, follower)
    File "/home/milan/Projects/startup/investors/models.py", line 72, in follow_investor
      investor, created = cls.objects.get_or_create(investor=investor)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/query.py", line 464, in get_or_create
      return self.get(**lookup), False
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/query.py", line 371, in get
      clone = self.filter(*args, **kwargs)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/query.py", line 784, in filter
      return self._filter_or_exclude(False, *args, **kwargs)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/query.py", line 802, in _filter_or_exclude
      clone.query.add_q(Q(*args, **kwargs))
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/sql/query.py", line 1250, in add_q
      clause, _ = self._add_q(q_object, self.used_aliases)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/sql/query.py", line 1276, in _add_q
      allow_joins=allow_joins, split_subq=split_subq,
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/sql/query.py", line 1179, in build_filter
      self.check_related_objects(field, value, opts)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/sql/query.py", line 1076, in check_related_objects
      self.check_query_object_type(value, opts, field)
    File "/home/milan/.virtualenvs/startup/lib/python3.5/site-packages/django/db/models/sql/query.py", line 1054, in check_query_object_type
      (value, opts.object_name))
  ValueError: Cannot query "milan": Must be "User" instance.
  [09/Oct/2017 14:02:18] "GET /investor/add/milan-raymond HTTP/1.1" 500 138655
  </code></pre>