From d03bc7771693a96a3075ba8c10364bb40585b386 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 1 Aug 2006 21:15:41 +0000 Subject: [PATCH] Refs #1796 -- Fixed a problem when creating models with relations to themselves: more than one instance was being created. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3510 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/related.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 5dd02bccf2..aa232c07f3 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -25,7 +25,7 @@ def add_lookup(rel_cls, field): 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)