X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ffc2e047ca6712af8da3e13891b7ea16f184264a..0a2221a9af54f60f93f0d9799a4b87a5774667d8:/apps/catalogue/models/image.py?ds=sidebyside diff --git a/apps/catalogue/models/image.py b/apps/catalogue/models/image.py index 90a6e02a..797d27d5 100755 --- a/apps/catalogue/models/image.py +++ b/apps/catalogue/models/image.py @@ -69,7 +69,9 @@ class Image(dvcs_models.Document): """Returns own file object. Ignores slug ad mime_type.""" return open(self.image.path) - picture_xml = self.publishable().materialize() + publishable = self.publishable() + assert publishable, _("There is no publishable revision") + picture_xml = publishable.materialize() try: picture = WLPicture.from_string(picture_xml.encode('utf-8'),