[Zope-dev] zpatterns-0.4a4

Jephte CLAIN Jephte.Clain@univ-reunion.fr
Mon, 26 Jun 2000 13:08:38 +0400


There is a bug (a feature?) in Specialist.getItem in zpatterns-0.4a4:

def getItem(self, key):
    if hasattr(self.aq_base,'retrieveItem'):
        return self.retrieveItem(key=key) # XXX need DTML check?

    for rack in self.rackList:
        item = rack.__of__(self).getItem(key)
        return item

This code should (IMHO) read:

def getItem(self, key):
    if hasattr(self.aq_base,'retrieveItem'):
        return self.retrieveItem(key=key) # XXX need DTML check?

    for rack in self.rackList:
        item = rack.__of__(self).getItem(key)
	if item is not None:
            return item
    return None

regards,
jephte clain
jclain@univ-reunion.fr