﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
312	Adding images fails for edit-inline with width_field set	nichyoung	Adrian Holovaty	"Adding an record containing an image using edit-inline fails with the error:
{{{
""$DJANGO_SRC/django/core/meta/fields.py"", line 415, in save_file
    setattr(new_object, self.width_field, getattr(original_object, self.width_field))

AttributeError: 'NoneType' object has no attribute 'width'
}}}
(where the model I'm trying to add has an integer field width).

The image is correctly added to the database and filesystem with the correct height and width.

The problem appears to be in {{{meta/__init__.py}}} where the {{{change}}} variable for the parent table is used for the child table - thus the file saveing code is told that an {{{original_object}}} exists where it does not.  Changing the {{{save_file}}} call use {{{old_rel_obj is not None}}} in place of {{{change}}} as in the attached patch fixes the problem.
"	defect	closed	contrib.admin		normal	fixed	edit-inline ImageField		Unreviewed	0	0	0	0	0	0
