From 0c128ffb2430b8577651cfc6751efcfbd7824f82 Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Sun, 19 Nov 2006 14:20:21 +0000 Subject: [PATCH] Fixed bug where assigning a connection though Class.objects.db would raise a NameError. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4086 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/__init__.py b/django/db/__init__.py index b0dfa31848..10b8665e6e 100644 --- a/django/db/__init__.py +++ b/django/db/__init__.py @@ -271,10 +271,10 @@ class ConnectionInfoDescriptor(object): def __set__(self, instance, value): try: - self.local.cnx[instance] = instance_connection + self.local.cnx[instance] = value except AttributeError: # First access in thread - self.local.cnx = {instance: instance_connection} + self.local.cnx = {instance: value} def __delete__(self, instance): try: