Commit 9f8624dc authored by Jim Fulton's avatar Jim Fulton

Added check to prevent copying or renaming propertysheets.

This is necessary due to oddities in the way that propertysheets
currently manage their data. :(
parent 0beb3e17
......@@ -125,6 +125,13 @@ class ZCommonSheet(OFS.PropertySheets.PropertySheet, OFS.SimpleItem.Item):
self.title=title
self._md={}
def manage_afterAdd(self,item,container):
if item is not self: return
if self._properties:
raise ValueError, (
'Non-empty propertysheets cannot currently be '
'added (or copied).<p>')
def v_self(self):
klass=self.aq_inner.aq_parent.aq_parent.aq_parent._zclass_
return ClassCaretaker(klass)
......
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