SHARE
TWEET

Untitled

a guest Jul 16th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "Incorrect type. Expected pk value, received str."
  2.     ]
  3.      
  4. class Case(models.Model):
  5.     name = models.CharField(max_length=200)
  6.     task = models.ManyToManyField('task.Task',blank=True, null=True)
  7.     assigned_to = models.ForeignKey("account.User",null=True, blank=True, on_delete=models.SET_NULL)
  8.  
  9. class CaseSerializer(serializers.ModelSerializer):
  10.     class Meta:
  11.         model = Case
  12.         fields = ('id', 'name', 'task', 'assigned_to')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top