[Erp5-report] r17112 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 23 11:20:02 CEST 2007


Author: jerome
Date: Tue Oct 23 11:20:02 2007
New Revision: 17112

URL: http://svn.erp5.org?rev=17112&view=rev
Log:
use if k in dict syntax rather than dict.get(k, None) is not None

Modified:
    erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=17112&r1=17111&r2=17112&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Tue Oct 23 11:20:02 2007
@@ -1565,7 +1565,7 @@
           # Make sure no duplicates - ie. if an object with different path has same uid, we need a new uid
           # This can be very dangerous with relations stored in a category table (CMFCategory)
           # This is why we recommend completely reindexing subobjects after any change of id
-          if uid_path_dict.get(uid, None) is not None:
+          if uid in uid_path_dict:
             catalog_path = uid_path_dict.get(uid)
           else:
             catalog_path = self.getPathForUid(uid)




More information about the Erp5-report mailing list