title: "Got KeyError when attempting to get a value for field devUserId on serializer AssetSerializer. Original exception text was: 'devUserId'
body: <p>models.py</p>
  <pre><code>class User(models.Model):
      googleId = models.CharField(max_length=512, primary_key=True, default='')
      imageURL = models.CharField(max_length=512, null=True)
      userName = models.CharField(max_length=512, null=True)
      firstName = models.CharField(max_length=512, null=True)
      lastName = models.CharField(max_length=512, null=True)
      #phoneNumberRegex = RegexValidator(regex=r&quot;^+?1?\d{8,15}$&quot;)
      phoneNumber = models.CharField(max_length=512, null=True)
      email1 = models.CharField(max_length=512, blank=False)
      email2 = models.CharField(max_length=512, blank=True)
      bio = models.TextField(blank=True)
      planId = models.ForeignKey('primal_user.Plans',
                                 on_delete=models.CASCADE,
                                 default=&quot;Free&quot;)
      password = models.CharField(max_length=512, null=True)
      accountCreationDate = models.DateTimeField(auto_now_add=True)
      coins = models.IntegerField(default=2)
      assetsDownloaded = models.IntegerField(default=0)
      assetsPurchased = models.IntegerField(default=0)
  
  class Asset(models.Model):
      assetId = models.CharField(max_length=20, primary_key=True)
      devUserId = models.ForeignKey(User, on_delete=models.CASCADE)
      keywordId = models.ForeignKey(Tags, on_delete=models.CASCADE)
      assetName = models.CharField(max_length=50, null=False)
      description = models.TextField(blank=True)
      features = models.TextField(blank=True)
      uploadedDate = models.DateField(auto_now_add=True)
      typeId = models.BooleanField(default=True)
      paidStatus = models.BooleanField(default=False)
      price = models.IntegerField(null=True)
      size = models.FloatField(null=False)
      downloadCount = models.BigIntegerField(null=True)
      version = models.CharField(max_length=10)
  </code></pre>
  <p>serializer.py</p>
  <pre><code>class UserSerializer(serializers.ModelSerializer):
      class Meta:
          model = User
          fields = '__all__'
  class AssetSerializer(serializers.ModelSerializer):
      class Meta:
          model = Asset
          fields = '__all__'
  </code></pre>
  <p>views.py</p>
  <pre><code>class UserAsset(APIView):
      def get(self,request,devUserId):
          try:
              user = Asset.objects.filter(devUserId=devUserId).values()
              serializer = AssetSerializer(user, many= True)
              return Response(serializer.data)
          except Asset.DoesNotExist:
              raise Http404
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ammVv.png" rel="nofollow noreferrer">KeyError</a></p>
  <p>I am a beginner in Django, so am unable to figure out what the issue is. I tried looking for solutions to similar questions but could not resolve the issue. I was getting attribute error, then it was resolved after I entered many=True in AssetSerializer but now I am stuck with this KeyError. A while trying to figure out the error, I noticed that this error is thrown while executing serializer.data. Thank You for any help possible.</p>