diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-01-18 15:53:19 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-01-18 15:53:19 +0000 |
| commit | 755278253ee792fc8a7589081261c6f0a66e1423 (patch) | |
| tree | ede3caf8d1942d472e601d14bf2e1458affbf6d0 /django/newforms/fields.py | |
| parent | 12efef06357544ee81a3731899f528e9b867792a (diff) | |
Fixed #6302 for ImageFields.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/fields.py')
| -rw-r--r-- | django/newforms/fields.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/newforms/fields.py b/django/newforms/fields.py index 0761b8f2af..bc3e543037 100644 --- a/django/newforms/fields.py +++ b/django/newforms/fields.py @@ -466,6 +466,8 @@ class ImageField(FileField): f = super(ImageField, self).clean(data, initial) if f is None: return None + elif not data and initial: + return initial from PIL import Image from cStringIO import StringIO try: |
