X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/06e460b91c23f11e92bf5ae711a4ed2226d3a0c7..5de19acd15a14ea2551ad57b28debc708043d830:/src/catalogue/models/chunk.py 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