[Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1
Andy Dawkins
andyd@nipltd.com
Mon, 05 Mar 2001 11:11:51 +0000
Andy Dawkins wrote:
> 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
>
People with an extremly keen eye (i.e. No one so far) may have noticed
that I have an extra ) on this line:
> elif type(newRow) == type(())):
So it should read:
> elif type(newRow) == type(()):
Cheers
-AndyD