mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +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:
parent
27bcc64ac5
commit
0c128ffb24
@ -271,10 +271,10 @@ class ConnectionInfoDescriptor(object):
|
|||||||
|
|
||||||
def __set__(self, instance, value):
|
def __set__(self, instance, value):
|
||||||
try:
|
try:
|
||||||
self.local.cnx[instance] = instance_connection
|
self.local.cnx[instance] = value
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# First access in thread
|
# First access in thread
|
||||||
self.local.cnx = {instance: instance_connection}
|
self.local.cnx = {instance: value}
|
||||||
|
|
||||||
def __delete__(self, instance):
|
def __delete__(self, instance):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user