title: Why can't I objects.get() a Django User by pk or id?
body: <p>I'm trying to wire up an API endpoint to allow admins to disable a user via a simple, body-less PATCH command. However, for some reason my View's <code>get_queryset()</code> always returns a 404:</p>
  
  <pre><code>from django.shortcuts import get_object_or_404
  from django.contrib.auth.models import User
  from .serializers import UserSerializer
  
  # Disable a User
  class DisableCompanyUserView(UpdateAPIView):
      model = User
      serializer_class = UserSerializer
      lookup_url_kwarg = 'user_id'
  
      def get_queryset(self):
          print(str(self.kwargs)) # returns {'user_id': '12'}
          return get_object_or_404(User, pk=self.kwargs[self.lookup_url_kwarg])
      ---snip---
  </code></pre>
  
  <p>I thought it might have been a type mismatch (i.e. self.kwargs['user_id'] was returning a string instead of an int) but I tried looking up the User by entering in <code>12</code> to the above return (as an integer, obviously) and still got back a 404. I also ripped out the shortcut function call, did the lookup manually, and <em>still</em> got back a 404:</p>
  
  <pre><code>try:
      return User.objects.get(pk=self.kwargs[self.lookup_url_kwarg])
      # return User.objects.get(pk=12) # also returns a 404
  except User.DoesNotExist:
      raise Http404()
  </code></pre>
  
  <p>I'm looking at the raw <code>auth_user</code> table right now and there's a record in there with an <code>id</code> of <code>12</code>, so I know that that User exists. What am I doing wrong?</p>