]> git.parisson.com Git - telemeta.git/commitdiff
bugfix
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 15 Jun 2015 07:37:10 +0000 (09:37 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 15 Jun 2015 07:37:10 +0000 (09:37 +0200)
telemeta/views/epub.py

index dde884ba429796ececb1c0084d6493566d5c5e03..3161d698491543728abfb93187b6486f0ac90843 100644 (file)
@@ -56,10 +56,9 @@ class BaseEpubMixin(TelemetaBaseMixin):
         site = Site.objects.get_current()
         self.chapters = []
         default_image_added = False
-        full_title = corpus.title + ' - ' + collection.title
 
         if not collection:
-            self.filename = self.corpus.code
+            self.filename = corpus.code
             self.book.set_title(corpus.title)
         else:
             self.filename = collection.code
@@ -70,6 +69,7 @@ class BaseEpubMixin(TelemetaBaseMixin):
                 short_title = 'Intro'
             self.book.set_title(corpus.title[:15] + '... ' + short_title)
 
+        full_title = corpus.title + ' - ' + collection.title
         self.path = self.cache_data.dir + os.sep + self.filename + '.epub'
 
         # add metadata