From 3565d1fee6f675646f60c1690bb1c81549b227a9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 2 Apr 2017 21:46:17 +0200 Subject: Finds: do not resize the image and regenerate a thumb on find duplication (refs #3579) --- ishtar_common/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 66433747c..7873b63f8 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -769,6 +769,10 @@ class ImageModel(models.Model): return SimpleUploadedFile('temp', temp.read()) def save(self, *args, **kwargs): + if 'force_copy' in kwargs: + kwargs.pop('force_copy') + super(ImageModel, self).save(*args, **kwargs) + return # manage images if self.has_changed('image') and self.image: # convert to jpg -- cgit v1.2.3