Commit 35072d9a authored by Jean-Paul Smets's avatar Jean-Paul Smets

Revert changes to makeInstanceTemplate


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5558 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 748e758c
......@@ -2277,9 +2277,11 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
"""
if self.getParentValue().getPortalType() == "Preference":
raise ValueError, "Template instances can not be created within Preferences"
#if hasattr(aq_base(self), 'isIndexable'): delattr(self, 'isIndexable')
#if hasattr(aq_base(self), 'isTemplate'): delattr(self, 'isTemplate')
# FIXME: attribute is not set on the class, delattr fails.
# We remove attributes from the instance
# We do this rather than self.isIndexable = 0 because we want to
# go back to previous situation (class based definition)
if self.__dict__.has_key('isIndexable'): delattr(self, 'isIndexable')
if self.__dict__.has_key('isTemplate'): delattr(self, 'isTemplate')
# Add to catalog
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