#24768: KeyError: u"Problem installing fixture '<filename>.json': u'manager'"
-------------------------------------+-------------------------------------
Reporter: brian | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by brian):
Ok, so I think the reason for the wrong type is because there is a clash
between two reverse accessors. Somehow django-audit-log is involved.
However, there was no clash in Django 1.7, and I don't understand why
there should be any clash in Django 1.8 either.
I have test code that will illustrate the problem, see
https://github.com/brianmay/django-24768
{{{
% python ./manage.py makemigrations polls --dry
SystemCheckError: System check identified some issues:
ERRORS:
polls.Project.group: (fields.E304) Reverse accessor for 'Project.group'
clashes with reverse accessor for 'Project.group'.
HINT: Add or change a related_name argument to the definition for
'Project.group' or 'Project.group'.
polls.Project.group: (fields.E305) Reverse query name for 'Project.group'
clashes with reverse query name for 'Project.group'.
HINT: Add or change a related_name argument to the definition for
'Project.group' or 'Project.group'.
polls.ProjectAuditLogEntry.group: (fields.E304) Reverse accessor for
'ProjectAuditLogEntry.group' clashes with reverse accessor for
'Project.group'.
HINT: Add or change a related_name argument to the definition for
'ProjectAuditLogEntry.group' or 'Project.group'.
}}}
I cannot reproduce my initial problem with this test program (see test.py
in that repository), however I strongly suspect that this was just a
symptom of the above problem.
The first two messages don't seem to make any sense. Project.group clashes
with itself???
The last one is probably more significant: Reverse accessor for
'ProjectAuditLogEntry.group' clashes with reverse accessor for
'Project.group'.
Shouldn't the first be called projectauditlogentry_set and the second be
called project? Maybe Django 1.8 is getting the related_name wrong in this
particular situation?
--
Ticket URL: <https://code.djangoproject.com/ticket/24768#comment:9>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.a5cd3e688c6d9010930a484b50169bff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.