[Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1

Andy Dawkins andyd@nipltd.com
Fri, 02 Mar 2001 09:52:30 +0000


Chris Withers wrote:
> Is there a workaround in the meantime? This is turning into a real
> showstopper for one of NIP's most important projects right now :~(
> 
> desperately,
> 

Chris

I the meantime I have changed that method to the following:

    def insertReverseIndexEntry(self, entry, documentId):
        """Insert the correct entry into the reverse indexes for future
        unindexing."""

        newRow = self._unindex.get(documentId, [])
        if newRow:
            # Catch cases where we don't need to modify anything
            if entry in newRow:
                return 1

        if type(newRow) == type([]):
            newRow.append(entry)
        elif type(newRow) == type(())):
            newRow = newRow + (entry,)
            
        self._unindex[documentId] = newRow

I know it isn't exactly the best fix in the world, but I stops the error
_today_ which is what we need.

So Until the next version it will do.

Cheers

-AndyD