mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-17 05:40:25 +00:00
Update fields.py
Don't overwrite existing image when form saved
This commit is contained in:
parent
bc8fdd7ada
commit
1a33c2be51
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ class ProcessedImageField(ImageField, SpecHost):
|
|||
def clean(self, data, initial=None):
|
||||
data = super(ProcessedImageField, self).clean(data, initial)
|
||||
|
||||
if data:
|
||||
if data and data != initial:
|
||||
spec = self.get_spec(source=data)
|
||||
data = generate(spec)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue