From bdca0aab1b07bc2e942ebc14a4e398bb4bc972b5 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 30 Aug 2011 17:50:32 +0200 Subject: [PATCH] book media rename bugfix --- apps/catalogue/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.20.1