Commit 8297bb12 authored by Jérome Perrin's avatar Jérome Perrin

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
parent ef770b7b
...@@ -1565,7 +1565,7 @@ class Catalog( Folder, ...@@ -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 # 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 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 # 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) catalog_path = uid_path_dict.get(uid)
else: else:
catalog_path = self.getPathForUid(uid) catalog_path = self.getPathForUid(uid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment