From b7fbf0185bb39d66b736dc9c857bbc5c7c20e22d Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Thu, 24 Jan 2008 14:33:49 +0000
Subject: [PATCH] Fixed a bug. preference may be None.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18853 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/Base_makeTemplateFromDocument.xml   | 3 ++-
 product/ERP5/bootstrap/erp5_core/bt/revision                   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml
index c9bf419d22..43f0afbbec 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml
@@ -68,7 +68,7 @@
             <value> <string>portal_preferences = context.portal_preferences\n
 \n
 preference = portal_preferences.getActivePreference()\n
-if preference.getPreferenceState()!=\'enabled\':\n
+if preference is None or preference.getPreferenceState()!=\'enabled\':\n
   p = portal_preferences.newContent()\n
   p.setTitle(\'Document Template Container\')\n
   p.enable()\n
@@ -135,6 +135,7 @@ return context.Base_redirect(form_id,\n
                             <string>context</string>
                             <string>portal_preferences</string>
                             <string>preference</string>
+                            <string>None</string>
                             <string>p</string>
                             <string>parent</string>
                             <string>document_id</string>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index ce7f605a46..8e6862383d 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-683
\ No newline at end of file
+684
\ No newline at end of file
-- 
2.30.9