Django

Code

Changeset 2335

Show
Ignore:
Timestamp:
02/18/06 11:44:31 (3 years ago)
Author:
lukeplant
Message:

magic-removal: Fixed an old variable name error in delete_file() for FileFields?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/db/models/fields/__init__.py

    r2264 r2335  
    477477 
    478478    def delete_file(self, instance): 
    479          if getattr(instance, f.attname): 
    480             file_name = getattr(instance, 'get_%s_filename' % f.name)() 
     479         if getattr(instance, self.attname): 
     480            file_name = getattr(instance, 'get_%s_filename' % self.name)() 
    481481            # If the file exists and no other object of this type references it, 
    482482            # delete it from the filesystem.