X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/30cd6983d7c3ce7a593d3f3c09560679ce1d3f26..90db3bbc700e6ee98fe222cd7de72b7dccc82bcc:/apps/catalogue/models/book.py diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 25b9304e..772634c6 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -270,6 +270,14 @@ class Book(models.Model): valid_about = self.correct_about() assert bi.about == valid_about, _("rdf:about is not") + " " + valid_about + def publishable_error(self): + try: + return self.assert_publishable() + except AssertionError, e: + return e + else: + return None + def hidden(self): return self.slug.startswith('.')