Author: mtredinnick
Date: 2008-12-11 01:31:41 -0600 (Thu, 11 Dec 2008)
New Revision: 9643

Modified:
   django/trunk/django/db/models/fields/related.py
   django/trunk/django/db/models/options.py
Log:
Removed django.db.models.options.Options.one_to_one_field.

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.


Modified: django/trunk/django/db/models/fields/related.py
===================================================================
--- django/trunk/django/db/models/fields/related.py     2008-12-11 07:07:03 UTC 
(rev 9642)
+++ django/trunk/django/db/models/fields/related.py     2008-12-11 07:31:41 UTC 
(rev 9643)
@@ -728,8 +728,6 @@
     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:

Modified: django/trunk/django/db/models/options.py
===================================================================
--- django/trunk/django/db/models/options.py    2008-12-11 07:07:03 UTC (rev 
9642)
+++ django/trunk/django/db/models/options.py    2008-12-11 07:31:41 UTC (rev 
9643)
@@ -41,7 +41,6 @@
         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 = {}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to