From 22acbcfc649a9b0f6e263229f32a65984819b0f2 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Wed, 6 Jan 2010 14:10:15 +0000 Subject: [PATCH] Fix tales expression when getContentType return None reviewed by romain git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31598 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ActionTemplateItem/portal_types/File/view_editor.xml | 6 ++++-- bt5/erp5_dms/bt/revision | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_dms/ActionTemplateItem/portal_types/File/view_editor.xml b/bt5/erp5_dms/ActionTemplateItem/portal_types/File/view_editor.xml index 56fa9954ce..1745ab7ee1 100644 --- a/bt5/erp5_dms/ActionTemplateItem/portal_types/File/view_editor.xml +++ b/bt5/erp5_dms/ActionTemplateItem/portal_types/File/view_editor.xml @@ -35,7 +35,9 @@ </item> <item> <key> <string>description</string> </key> - <value> <string></string> </value> + <value> + <none/> + </value> </item> <item> <key> <string>icon</string> </key> @@ -95,7 +97,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>python: object is not None and not object.isWebMode() and object.getContentType().startswith(\'text/\')</string> </value> + <value> <string>python: object is not None and not object.isWebMode() and (object.getContentType() or \'\').startswith(\'text/\')</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision index ee530325f3..12b3ce6528 100644 --- a/bt5/erp5_dms/bt/revision +++ b/bt5/erp5_dms/bt/revision @@ -1 +1 @@ -1052 \ No newline at end of file +1056 \ No newline at end of file -- 2.30.9