Skip to content

Commit

Permalink
Fixed problem of ZCatalog instantiation with no container and no voca…
Browse files Browse the repository at this point in the history
…b_id.
  • Loading branch information
mcdonc committed Mar 21, 2001
1 parent ce0a44d commit 9221e3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ZCatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ class is that it is not Zope specific. You can use it in any
_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

Expand Down

0 comments on commit 9221e3b

Please sign in to comment.