a guest Jul 16th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- "Incorrect type. Expected pk value, received str."
- class Case(models.Model):
- name = models.CharField(max_length=200)
- task = models.ManyToManyField('task.Task',blank=True, null=True)
- assigned_to = models.ForeignKey("account.User",null=True, blank=True, on_delete=models.SET_NULL)
- class CaseSerializer(serializers.ModelSerializer):
- class Meta:
- model = Case
- fields = ('id', 'name', 'task', 'assigned_to')
RAW Paste Data