- Notifications
You must be signed in to change notification settings - Fork302
Closed
Labels
Description
If a model has an id column that's an integer primary key
classPerson(models.Model):id=models.IntegerField(primary_key=True)name=models.CharField(max_length=200)
and a fixture is loaded where the id has value 0
[ {"model":"project.person","fields": {"id":0,"name":"Example"}}, {"model":"project.person","fields": {"id":1,"name":"Someone"}}]
then the JSON response returned from the API replaces the id of 0 with null
"data": [ {"type":"person","id":null,"attributes": {"name":"Example" } }, {"type":"person","id":"1","attributes": {"name":"Someone" } } ],