From 029257874572c23455c66d2a9289df930c25c515 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 6 Nov 2005 22:46:56 +0000 Subject: [PATCH] Fixed #312 -- Fixed bug when adding images in the admin when edit_inline and width field is set. Thanks, nichyoung git-svn-id: http://code.djangoproject.com/svn/django/trunk@1104 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/meta/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index 2e39f72e95..93f5aa4d0d 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -1567,7 +1567,7 @@ def manipulator_save(opts, klass, add, change, self, new_data): # Save any uploaded files. for f in rel_opts.fields: if isinstance(f, FileField) and rel_new_data.get(f.name, False): - f.save_file(rel_new_data, new_rel_obj, change and old_rel_obj or None, change, rel=True) + f.save_file(rel_new_data, new_rel_obj, change and old_rel_obj or None, old_rel_obj is not None, rel=True) # Calculate whether any fields have changed. if change: