X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/30cd6983d7c3ce7a593d3f3c09560679ce1d3f26..841482ca6227b2e32740846fce1ed47d4fed9db8:/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('.')