ISBN in html reader
[wolnelektury.git] / src / catalogue / models / book.py
index 5ac999e..c537e5d 100644 (file)
@@ -386,6 +386,7 @@ class Book(models.Model):
         for child in notify_cover_changed:
             child.parent_cover_changed()
 
+        book.save()  # update sort_key_author
         cls.published.send(sender=cls, instance=book)
         return book
 
@@ -499,6 +500,13 @@ class Book(models.Model):
             names = [tag[0] for tag in names]
         return ', '.join(names)
 
+    def publisher(self):
+        publisher = self.extra_info['publisher']
+        if isinstance(publisher, basestring):
+            return publisher
+        elif isinstance(publisher, list):
+            return ', '.join(publisher)
+
     @classmethod
     def tagged_top_level(cls, tags):
         """ Returns top-level books tagged with `tags`.