Commit 4f1353db authored by Jérome Perrin's avatar Jérome Perrin

disable delattr() in makeTemplateInstance, because attribute is not set on the class.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5514 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 34dd7da1
...@@ -2246,8 +2246,10 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -2246,8 +2246,10 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
""" """
if self.getParentValue().getPortalType() == "Preference": if self.getParentValue().getPortalType() == "Preference":
raise ValueError, "Template instances can not be created within Preferences" raise ValueError, "Template instances can not be created within Preferences"
if hasattr(aq_base(self), 'isIndexable'): delattr(self, 'isIndexable') #if hasattr(aq_base(self), 'isIndexable'): delattr(self, 'isIndexable')
if hasattr(aq_base(self), 'isTemplate'): delattr(self, 'isTemplate') #if hasattr(aq_base(self), 'isTemplate'): delattr(self, 'isTemplate')
# FIXME: attribute is not set on the class, delattr fails.
# Add to catalog # Add to catalog
self.reindexObject() self.reindexObject()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment