From 21964c3be8e3bd54d3c13ff5c9b1d89538391873 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Mon, 6 Jun 2011 14:17:12 +0300 Subject: [PATCH] Without content type no way to determine target format list. --- .../portal_skins/erp5_dms/Base_getTargetFormatItemList.xml | 4 +++- bt5/erp5_dms/bt/revision | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_getTargetFormatItemList.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_getTargetFormatItemList.xml index a37958b1f6..b1e01c9eb7 100644 --- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_getTargetFormatItemList.xml +++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_getTargetFormatItemList.xml @@ -68,6 +68,9 @@ portal = context.getPortalObject()\n content_type = context.getContentType()\n \n def getTargetFormatItemList(content_type):\n + # without content type no wayto determine target format\n + if content_type is None:\n + return []\n format_list = []\n output_content_type_list = []\n for obj in portal.portal_transforms.objectValues():\n @@ -92,7 +95,6 @@ def getTargetFormatItemList(content_type):\n getTargetFormatItemList = CachingMethod(getTargetFormatItemList,\n id=\'Base_getTargetFormatItemList\',\n cache_factory=\'erp5_ui_long\')\n -\n return getTargetFormatItemList(content_type)\n </string> </value> </item> diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision index 6d60af2fbf..746faa2a85 100644 --- a/bt5/erp5_dms/bt/revision +++ b/bt5/erp5_dms/bt/revision @@ -1 +1 @@ -1249 \ No newline at end of file +1250 \ No newline at end of file -- 2.30.9