title: Django - InheritanceManager is not working
body: <p>I have the following simple <code>models.py</code> file:</p>
  
  <pre><code>from django.db import models
  from model_utils.managers import InheritanceManager
  
  class Clique(models.Model):
      created = models.DateTimeField(auto_now_add=True)
      name = models.CharField(max_length=100, blank=False)
  
  class Post(models.Model):
      created = models.DateTimeField(auto_now_add=True)
      headline = models.TextField()
      clique = models.ForeignKey(Clique,
                                 on_delete=models.CASCADE,
                                 blank=True,
                                 null=True)
      objects = InheritanceManager()
      def __str__(self):
          return self.headline
  
  
  class VideoPost(Post):
      video = models.BooleanField(default=True)
  
  
  class ImagePost(Post):
      image = models.BooleanField(default=True)
  </code></pre>
  
  <p>So, there is a <code>Clique</code> model which can contain multiple <code>Post</code> instances. The <code>Post</code> instances can be <code>ImagePost</code> or <code>VideoPost</code>. Therefore, <code>ImagePost</code> and <code>VideoPost</code> both inherit <code>Post</code>.</p>
  
  <p>Now, let's say I want to retrieve the ImagePost subclass instances. So, I have the following view in my views.py file:</p>
  
  <pre><code>class PostList(generics.ListAPIView):
      serializer_class = PostSerializer
  
      def get_queryset(self):
          return Post.objects.select_subclasses(ImagePost)
  </code></pre>
  
  <p>When I pass the endpoint <code>posts/</code> in the url, then this view will be triggered and it should give me only the <code>ImagePost</code> instances, right ? But I also get the <code>VideoPost</code> instances from the database:</p>
  
  <pre><code>[
      {
          "clique": "http://127.0.0.1:8000/cliques/1/", 
          "comment_set": [], 
          "created": "2019-06-18T09:52:47.929623Z", 
          "headline": "FirstImagePost", 
          "id": 1, 
          "url": "http://127.0.0.1:8000/posts/1/"
      }, 
      {
          "clique": "http://127.0.0.1:8000/cliques/1/", 
          "comment_set": [], 
          "created": "2019-06-18T09:53:20.266653Z", 
          "headline": "FirstVideoPost", 
          "id": 2, 
          "url": "http://127.0.0.1:8000/posts/2/"
      }
  ]
  </code></pre>
  
  <p>Why is this happening ? I walked through the official doc <a href="https://django-model-utils.readthedocs.io/en/latest/managers.html" rel="nofollow noreferrer">here</a> . Can somebody help</p>
  
  <p>Just for the sake of completeness, my <code>serializers.py</code> file looks like the following:</p>
  
  <pre><code>from rest_framework import serializers
  from posts.models import Post, VideoPost, ImagePost, Clique
  
  class CliqueSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = Clique
          fields = ('id', 'name', 'post_set')
          read_only_fields = ('post_set', )
  
  class PostSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = Post
          fields = ('url', 'id', 'created', 'headline', 'clique', 'comment_set',)
          read_only_fields = ('comment_set',)
  
  
  class VideoPostSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = VideoPost
          fields = '__all__'
  
  
  class ImagePostSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = ImagePost
          fields = '__all__'
  </code></pre>