X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/e5ba4e015ad743e8581275272c61a660f32d9fed..b0af42626632f8750ac9e88338be7e196bd4f91d:/apps/catalogue/models/book.py?ds=sidebyside diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 76381b84..8c9e6e6a 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -72,6 +72,11 @@ class Book(models.Model): def get_absolute_url(self): return ("catalogue_book", [self.slug]) + def correct_about(self): + return "http://%s%s" % ( + Site.objects.get_current().domain, + self.get_absolute_url() + ) # Creating & manipulating # ======================= @@ -230,7 +235,7 @@ class Book(models.Model): except ValidationError, e: raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e)) - valid_about = "http://%s%s" % (Site.objects.get_current().domain, self.get_absolute_url()) + valid_about = self.correct_about() assert bi.about == valid_about, _("rdf:about is not") + " " + valid_about def hidden(self):