From: Radek Czajka Date: Wed, 21 Dec 2011 11:42:43 +0000 (+0100) Subject: bugfix X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/0a08ba4250b13d7804118703aa0acca6a1a1703c?ds=sidebyside;hp=--cc bugfix --- 0a08ba4250b13d7804118703aa0acca6a1a1703c 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'),