Opened 18 years ago

Closed 17 years ago

#1708 closed defect (worksforme)

Problem with OneToOneField(self)

Reported by: Dagur Páll Ammendrup Owned by: Adrian Holovaty
Component: contrib.admin Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I had this line in my model:

    reply_to = models.OneToOneField('self', null=True, blank=True)

But that results in this error:

Traceback (most recent call last):
...
  File "/usr/lib/python2.4/site-packages/django/db/models/fields/related.py", line 510, in __init__
    to_field = to_field or to._meta.pk.name
AttributeError: 'str' object has no attribute '_meta'

Something left fixing for M-R?

Change History (1)

comment:1 by Simon G. <dev@…>, 17 years ago

Resolution: worksforme
Status: newclosed

I'm unable to replicate this as of r4528, please reopen this ticket if this is still an issue.

Note: See TracTickets for help on using tickets.
Back to Top