﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20820	Loaddata on dumpdata'd subclass fails	jeroen.pulles@…	Tim Graham	"I have a problem with loaddata on a subclass of contrib.auth.User. The dumpdata generates data that looks fine. The JSON I get is identical to Django 1.5 which loads just fine. Loaddata in 1.6b1 fails to load that data, however. I get the impression that it is caused by subclassing, as none of the other relations in the models cause trouble. I have attached a small sample project with just the subclass to reproduce the problem (""sample.zip""). 

Loaddata crashes with this exception ''ValueError: Problem installing fixture '/Volumes/prj/myapp/fixtures/ennu.json': ""<MiniUser: >"" needs to have a value for field ""user"" before this many-to-many relationship can be used.'' (This is the user-permission related manager complaining, by the way)

This is what the MiniUser model looks like: 

{{{
class MiniUser(User):
    mini = models.IntegerField()
}}}

This is a snippet from dumpdata:

{{{
...
  {
    ""pk"": 1,
    ""model"": ""myapp.miniuser"",
    ""fields"": {
      ""user_permissions"": [],
      ""mini"": 123,
      ""groups"": []
    }
...
}}}

When I remove the ""user_permissions"" and ""groups"" properties (from auth.User) from the myapp.miniuser json, loaddata completes just fine. 

"	Bug	closed	Core (Serialization)	1.6-beta-1	Release blocker	fixed			Accepted	0	0	0	0	0	0
