Code

Opened 8 years ago

Closed 7 years ago

#1708 closed defect (worksforme)

Problem with OneToOneField(self)

Reported by: Dagur Owned by: adrian
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: UI/UX:

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?

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to worksforme
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.