Skip to content
Browse files

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
  • Loading branch information...
1 parent 27bcc64 commit 0c128ffb2430b8577651cfc6751efcfbd7824f82 @jpellerin jpellerin committed Nov 19, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/__init__.py
View
4 django/db/__init__.py
@@ -271,10 +271,10 @@ def __get__(self, instance, type=None):
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:

0 comments on commit 0c128ff

Please sign in to comment.
Something went wrong with that request. Please try again.