[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - adding.py:1.18

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Aug 16 11:08:47 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv20635/browser/container

Modified Files:
	adding.py 
Log Message:
In Garrett's last checking he required that a content name must be specified
in order for the adding to work. This was a too hard of a restriction, since
some containers know how to generate names themselves. Good examples are 
the Authentication Source and the Registration Manager components. I have
removed that requirement and fixed the test.


=== Zope3/src/zope/app/browser/container/adding.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/browser/container/adding.py:1.17	Fri Aug 15 20:42:41 2003
+++ Zope3/src/zope/app/browser/container/adding.py	Sat Aug 16 10:08:06 2003
@@ -45,8 +45,6 @@
 
     def add(self, content):
         """See zope.app.interfaces.container.IAdding"""
-        if not self.contentName:
-            raise ValueError("contentName is not set")
         container = zapi.getAdapter(self.context, IZopeContainer)
         name = container.setObject(self.contentName, content)
         return container[name]




More information about the Zope3-Checkins mailing list