X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/30cd6983d7c3ce7a593d3f3c09560679ce1d3f26..e2d4fbf230c90dcf3e904351a70d399426478352:/apps/catalogue/models/book.py?ds=sidebyside 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('.')