From: Radek Czajka Date: Tue, 30 Aug 2011 15:50:32 +0000 (+0200) Subject: book media rename bugfix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/bdca0aab1b07bc2e942ebc14a4e398bb4bc972b5?hp=e8a39561742ca18333e696b7b118b8edcc8aa3ea book media rename bugfix --- diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index a0ebf052c..cda5ba532 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -205,7 +205,7 @@ class BookMedia(models.Model): pass else: # if name changed, change the file name, too - if self.name != old.name: + if slughifi(self.name) != slughifi(old.name): self.file.save(None, ExistingFile(self.file.path), save=False, leave=True) super(BookMedia, self).save(*args, **kwargs)