From 9881e049d0f2fe8cb175c0f1b0c47c9ba64cffaa Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 4 Feb 2006 00:27:45 +0000 Subject: [PATCH] magic-removal: Fixed old-style DB API call in FileField.delete_file() git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2264 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 7bcc01b0d7..867d6f81a5 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -481,7 +481,7 @@ class FileField(Field): # If the file exists and no other object of this type references it, # delete it from the filesystem. if os.path.exists(file_name) and \ - not instance.__class__._default_manager.get_list(**{'%s__exact' % self.name: getattr(instance, self.attname)}): + not instance.__class__._default_manager.filter(**{'%s__exact' % self.name: getattr(instance, self.attname)}): os.remove(file_name) def get_manipulator_field_objs(self):