#5572: Can't have empty fixture file with Auto Increment Field in Model
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: nobody
Status: new | Component: Serialization
Version: SVN | Keywords: empty fixture file json serialization
auto increment
Stage: Unreviewed | Has_patch: 0
-----------------------+----------------------------------------------------
You can't have a empty fixture file when model has Auto Increment Field.
class Category(models.Model):
id = models.AutoField(primary_key=True)
parent_id = models.IntegerField()
name = models.CharField(maxlength=200)
Problem installing fixture 'c:\mysite\apps\category\fixtures
\initial_data.yaml': 'NoneType' object has no attribute 'anchor'
This error is due to auto incremented primary key. you can't have
empty fixture file.
--
Ticket URL: <http://code.djangoproject.com/ticket/5572>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---