[Zope3-dev] Calling NameChooser methods from default AddView - Bug?
Mohsen Moeeni
listless at gmail.com
Wed Mar 1 07:03:14 EST 2006
Hi;
Revision 65664
$ZOPE/src/zope/app/container/browser/adding.py
class Adding, method add, line 70
I am afraid:
chooser.checkName(name, container)
Must be:
chooser.checkName(name, content)
But I might miss something there as a noob.
Cheers,
Mohsen,
from $ZOPE/src/zope/app/container/browser/adding.py:
Class Adding(BrowserView):
def add(self, content):
[snip]
if IContainerNamesContainer.providedBy(container):
# The container picks its own names.
# We need to ask it to pick one.
name = chooser.chooseName(self.contentName or '', content)
else:
request = self.request
name = request.get('add_input_name', name)
if name is None:
name = chooser.chooseName(self.contentName or '', content)
elif name == '':
name = chooser.chooseName('', content)
chooser.checkName(name, container)
More information about the Zope3-dev
mailing list