[Zope-Checkins] SVN: Zope/trunk/ Collector #1826: manage_convertIndexes() - fixed handling of PathIndexes

Andreas Jung andreas at andreas-jung.com
Sat Jul 2 04:54:22 EDT 2005


Log message for revision 30979:
  Collector #1826: manage_convertIndexes() - fixed handling of PathIndexes
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Products/ZCatalog/ZCatalog.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2005-07-02 08:50:41 UTC (rev 30978)
+++ Zope/trunk/doc/CHANGES.txt	2005-07-02 08:54:22 UTC (rev 30979)
@@ -39,7 +39,7 @@
       - Collector #1808: manage_convertIndexes no longer tries to change the
         index types causing some trouble with CMF.
 
-      - manage_convertIndexes now handles DateRangeIndexes properly
+      - manage_convertIndexes now handles DateRangeIndexes and PathIndexes properly
 
       - WebDAV COPY and MOVE did not call '_notifyOfCopyTo' and
         '_postCopy' hooks like it was done in

Modified: Zope/trunk/lib/python/Products/ZCatalog/ZCatalog.py
===================================================================
--- Zope/trunk/lib/python/Products/ZCatalog/ZCatalog.py	2005-07-02 08:50:41 UTC (rev 30978)
+++ Zope/trunk/lib/python/Products/ZCatalog/ZCatalog.py	2005-07-02 08:54:22 UTC (rev 30979)
@@ -925,11 +925,15 @@
         for idx in self.Indexes.objectValues():
             bases = [str(name) for name in idx.__class__.__bases__]
             found = False
-            for base in bases:
-                if 'UnIndex' in base:
-                    found = True
-                    break
 
+            if idx.meta_type == 'PathIndex':
+                found = True
+            else:
+                for base in bases:
+                    if 'UnIndex' in base:
+                        found = True
+                        break
+
             if found:
                 idx_type = idx.meta_type
                 idx_id = idx.getId()



More information about the Zope-Checkins mailing list