From 64c7696e19cc6c6c8d3d85d34f20bed7147e8ecb Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Tue, 5 Apr 2011 13:08:39 +0000
Subject: [PATCH] Fix condition, return original content only if format is
 empty and no parameters are passed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45090 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Image.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/ERP5/Document/Image.py b/product/ERP5/Document/Image.py
index d7e96b0141..46e2c647d3 100644
--- a/product/ERP5/Document/Image.py
+++ b/product/ERP5/Document/Image.py
@@ -269,7 +269,7 @@ class Image(TextConvertableMixin, File, OFSImage):
         data = aq_base(data)
         self.setConversion(data, mime=mime_type, format=format)
         return mime_type, data
-    if not (format and kw):
+    if not (format or kw):
       # User asked for original content
       return self.getContentType(), self.getData()
     image_size = self.getSizeFromImageDisplay(kw.get('display'))
-- 
2.30.9