diff --git a/product/ZSQLCatalog/ZSQLCatalog.py b/product/ZSQLCatalog/ZSQLCatalog.py index 1d80da1543eaa61b96e77c27c6e0c584805365fc..ac8239f386baf32f5e053ffa187dcfae3a16719b 100755 --- a/product/ZSQLCatalog/ZSQLCatalog.py +++ b/product/ZSQLCatalog/ZSQLCatalog.py @@ -596,6 +596,8 @@ class ZCatalog(Folder, Persistent, Implicit): def catalogObjectList(self, object_list, sql_catalog_id=None,**kw): """Catalog a list of objects. """ + hot_reindexing = (self.hot_reindexing_state is not None and self.source_sql_catalog_id == catalog.id) + wrapped_object_list = [] failed_object_list = [] url_list = [] @@ -624,8 +626,7 @@ class ZCatalog(Folder, Persistent, Implicit): catalog = self.getSQLCatalog(sql_catalog_id) if catalog is not None: catalog.catalogObjectList(wrapped_object_list,**kw) - - if self.hot_reindexing_state is not None and self.source_sql_catalog_id == catalog.id: + if hot_reindexing: destination_catalog = self.getSQLCatalog(self.destination_sql_catalog_id) if destination_catalog.id != catalog.id: if self.hot_reindexing_state == 'recording':