[Zope-Checkins] CVS: Zope2 - ZCatalog.py:1.74.2.11
Chris McDonough
chrism@digicool.com
Wed, 21 Mar 2001 17:48:05 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/Products/ZCatalog
In directory korak:/home/chrism/sandboxes/Test/lib/python/Products/ZCatalog
Modified Files:
Tag: zope-2_3-branch
ZCatalog.py
Log Message:
Fixed instantiation of catalog with no vocab_id and no container.
--- Updated File ZCatalog.py in package Zope2 --
--- ZCatalog.py 2001/03/21 21:41:50 1.74.2.10
+++ ZCatalog.py 2001/03/21 22:48:04 1.74.2.11
@@ -224,8 +224,11 @@
_v_transaction = None
def __init__(self, id, title='', vocab_id=None, container=None):
- self=self.__of__(container)
-
+ if vocab_id is not None and container is None:
+ raise CatalogError, ("You cannot specify a vocab_id without "
+ "also specifying a container.")
+ if container is not None:
+ self=self.__of__(container)
self.id=id
self.title=title