X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/06e460b91c23f11e92bf5ae711a4ed2226d3a0c7..f16104e5ce08700745c66caf77c2e6403243059c:/src/catalogue/models/chunk.py?ds=sidebyside diff --git a/src/catalogue/models/chunk.py b/src/catalogue/models/chunk.py index ade5cde1..4182d08f 100755 --- a/src/catalogue/models/chunk.py +++ b/src/catalogue/models/chunk.py @@ -43,7 +43,7 @@ class Chunk(dvcs_models.Document): # Representing # ============ - def __unicode__(self): + def __str__(self): return "%d:%d: %s" % (self.book_id, self.number, self.title) @models.permalink @@ -54,7 +54,7 @@ class Chunk(dvcs_models.Document): title = self.book.title if self.title: title += ", %s" % self.title - if book_length > 1: + if book_length and book_length > 1: title += " (%d/%d)" % (self.number, book_length) return title