Skip to content

Commit

Permalink
Removed django.db.models.options.Options.one_to_one_field.
Browse files Browse the repository at this point in the history
The last use of it was removed in r9641 (it's internal API) and it's been
broken since r7477, as there's no longer a maximum of one OneToOneField per
model, so anything relying on it contained subtle bugs.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Dec 11, 2008
1 parent bb6d5dc commit f1f1d36
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions django/db/models/fields/related.py
Expand Up @@ -728,8 +728,6 @@ def __init__(self, to, to_field=None, **kwargs):
def contribute_to_related_class(self, cls, related):
setattr(cls, related.get_accessor_name(),
SingleRelatedObjectDescriptor(related))
if not cls._meta.one_to_one_field:
cls._meta.one_to_one_field = self

def formfield(self, **kwargs):
if self.rel.parent_link:
Expand Down
1 change: 0 additions & 1 deletion django/db/models/options.py
Expand Up @@ -41,7 +41,6 @@ def __init__(self, meta, app_label=None):
self.meta = meta
self.pk = None
self.has_auto_field, self.auto_field = False, None
self.one_to_one_field = None
self.abstract = False
self.parents = SortedDict()
self.duplicate_targets = {}
Expand Down

0 comments on commit f1f1d36

Please sign in to comment.