diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml index 274647dc5ca06205e962ddace67197529e184f21..d33f000f288864ec00c25c43f578c1ac1ec6fd86 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml @@ -67,15 +67,15 @@ <item> <key> <string>_body</string> </key> <value> <string>print "#### Indexing person_module, stage 1 ####"\n -person_module=context.getPortalObject().person_module\n -person_module.reindexObject(tag=\'person_stage_1\',\n - sql_catalog_id=sql_catalog_id,\n - passive_commit=passive_commit)\n -for o in person_module.objectValues():\n - o.recursiveReindexObject(tag=\'person_stage_1\',\n - sql_catalog_id=sql_catalog_id,\n - passive_commit=passive_commit)\n -\n +person_module=getattr(context.getPortalObject(), \'person_module\', None)\n +if person_module is not None :\n + person_module.reindexObject(tag=\'person_stage_1\',\n + sql_catalog_id=sql_catalog_id,\n + passive_commit=passive_commit)\n + for o in person_module.objectValues():\n + o.recursiveReindexObject(tag=\'person_stage_1\',\n + sql_catalog_id=sql_catalog_id,\n + passive_commit=passive_commit)\n \n print "#### Indexing translations ####"\n context.ERP5Site_updateTranslationTable(after_tag=(\'person_stage_1\', ),\n @@ -301,8 +301,10 @@ return printed\n <string>passive_commit</string> <string>_print_</string> <string>_print</string> + <string>getattr</string> <string>_getattr_</string> <string>context</string> + <string>None</string> <string>person_module</string> <string>_getiter_</string> <string>o</string>