[Checkins] SVN: Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py explain nicety

Hano Schlichting cvs-admin at zope.org
Sat Apr 7 10:53:33 UTC 2012


Log message for revision 125056:
  explain nicety
  

Changed:
  U   Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py

-=-
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py	2012-04-07 10:51:24 UTC (rev 125055)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py	2012-04-07 10:53:29 UTC (rev 125056)
@@ -903,6 +903,9 @@
             if len(sort_indexes) > 2:
                 raise CatalogError('Two sort indexes are supported at max, '
                     'got: %s' %repr(name))
+            if len(sort_indexes) == 1:
+                # be nice and keep the old API intact for single sort_on's
+                return sort_indexes[0]
             return sort_indexes
         return None
 



More information about the checkins mailing list