title: How to serialize a django model using serpy package
body: <p>I'm trying to serialize the default User model using the serpy package but no success.</p>
  <p>Serializers</p>
  <pre><code>class GroupSerializer(serpy.Serializer):
     id = serpy.IntField(required=True)
     name = serpy.StrField(required=True)
  
  class UserSerializer(serpy.Serializer):
     id = serpy.IntField(required=True)
     email = serpy.StrField(required=True)
     username = serpy.StrField(required=True)
     groups = GroupSerializer(many=True, attr=&quot;groups.all&quot;, call=True)
  </code></pre>
  <p>I use model viewsets for both serializers; like so</p>
  <pre><code>class UserViewset(...):
     queryset = get_user_model().objects.all()
     serializer_class = UserSerializer
  </code></pre>
  <p>I followed this Github issue <a href="https://github.com/clarkduvall/serpy/issues/17" rel="nofollow noreferrer">https://github.com/clarkduvall/serpy/issues/17</a> and now I get <strong>'NoneType' object has no attribute 'id'</strong>.</p>
  <p>I then tried</p>
  <pre><code>class UserSerializer (..):
     id = serpy.MethodField()
  
     def get_id(self, user):
        return user.id 
  </code></pre>
  <p>Yet same error!
  It seems the user object isn't properly gotten.
  The same error for the groups.</p>
  <p>I've tried dropping the required=True, but nothing.</p>