From 8297bb12f7badff2d32694b7a36df8740a7226e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 23 Oct 2007 09:20:02 +0000 Subject: [PATCH] use if k in dict syntax rather than dict.get(k, None) is not None git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17112 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/SQLCatalog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index c5cfb87291..018202e7fc 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -1565,7 +1565,7 @@ class Catalog( Folder, # 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) -- 2.30.9