bugfix
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Dec 2011 11:42:43 +0000 (12:42 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Dec 2011 11:42:43 +0000 (12:42 +0100)
apps/catalogue/models/image.py

index 90a6e02..797d27d 100755 (executable)
@@ -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'),