Fixed #10196: Restored setting of image file width and height fields lost in r9766, and added tests for this function. Thanks to vicvicvic for the ticket and patch and for Alex for reminding me not to break non-PIL-boxes with the new tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2009-02-16 18:34:28 +00:00
parent 11bfe72366
commit ecc55503f4
4 changed files with 103 additions and 27 deletions

View file

@ -132,7 +132,7 @@ class FileDescriptor(object):
# have the FieldFile interface added to them
file_copy = copy.copy(file)
file_copy.__class__ = type(file.__class__.__name__,
(file.__class__, FieldFile), {})
(file.__class__, self.field.attr_class), {})
file_copy.instance = instance
file_copy.field = self.field
file_copy.storage = self.field.storage