diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-09-04 20:05:24 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-09-04 20:05:24 +0200 |
commit | 057f6d81d5dee5ba8eba2fd959553cf57657990d (patch) | |
tree | d7e4c7b4121f09210b398aa4d6bc3830e6e1858e /ishtar_common/models.py | |
parent | 843dbe43a597438c62471e2bdc3758db8e2708c0 (diff) | |
download | Ishtar-057f6d81d5dee5ba8eba2fd959553cf57657990d.tar.bz2 Ishtar-057f6d81d5dee5ba8eba2fd959553cf57657990d.zip |
Improve Image field management (refs #1365)
* add a custom widget to allow display via prettyPhoto on forms
* disable resizing when the image is deleted
* fix "has image" search request to manage empty and null field for images
* fix deletion of files by the wizard
* fix initialization of instancied form for files and images
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index fb6bebed7..e1ca73a3b 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -291,7 +291,7 @@ class ImageModel(models.Model): def save(self, *args, **kwargs): # manage images - if self.has_changed('image'): + if self.has_changed('image') and self.image: # convert to jpg filename = os.path.splitext(os.path.split(self.image.name)[-1])[0] old_path = self.image.path |