1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

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
This commit is contained in:
Jason Pellerin 2006-11-19 14:20:21 +00:00
parent 27bcc64ac5
commit 0c128ffb24

View File

@ -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: