|
|
@ -793,7 +793,10 @@ class Organizator(models.Model): |
|
|
|
verbose_name_plural = 'Organizátoři' |
|
|
|
|
|
|
|
def save(self): |
|
|
|
if self.id is not None: |
|
|
|
puvodni = Organizator.objects.get(id=self.id) |
|
|
|
if self.foto: |
|
|
|
if not puvodni or puvodni.foto != self.foto: |
|
|
|
original = Image.open(self.foto) |
|
|
|
jmeno = os.path.basename(self.foto.file.name) |
|
|
|
Organizator._vyrobMiniaturu(original, jmeno, 500, self.foto) |
|
|
|