Django

Code

Changeset 4086

Show
Ignore:
Timestamp:
11/19/06 08:20:21 (2 years ago)
Author:
jpellerin
Message:

Fixed bug where assigning a connection though Class.objects.db would raise a NameError?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/multiple-db-support/django/db/__init__.py

    r3768 r4086  
    272272    def __set__(self, instance, value): 
    273273        try: 
    274             self.local.cnx[instance] = instance_connection 
     274            self.local.cnx[instance] = value 
    275275        except AttributeError: 
    276276            # First access in thread 
    277             self.local.cnx = {instance: instance_connection
     277            self.local.cnx = {instance: value
    278278 
    279279    def __delete__(self, instance):