Author: mtredinnick
Date: 2006-08-01 16:15:41 -0500 (Tue, 01 Aug 2006)
New Revision: 3510

Modified:
   django/trunk/django/db/models/fields/related.py
Log:
Refs #1796 -- Fixed a problem when creating models with relations to
themselves: more than one instance was being created.


Modified: django/trunk/django/db/models/fields/related.py
===================================================================
--- django/trunk/django/db/models/fields/related.py     2006-08-01 20:48:26 UTC 
(rev 3509)
+++ django/trunk/django/db/models/fields/related.py     2006-08-01 21:15:41 UTC 
(rev 3510)
@@ -25,7 +25,7 @@
     key = (module, name)
     # Has the model already been loaded?
     # If so, resolve the string reference right away
-    model = get_model(rel_cls._meta.app_label,field.rel.to)
+    model = get_model(rel_cls._meta.app_label, field.rel.to, False)
     if model:
         field.rel.to = model
         field.do_related_class(model, rel_cls)


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

Reply via email to