[Erp5-report] r6777 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 18 13:08:53 CEST 2006


Author: jerome
Date: Tue Apr 18 13:08:46 2006
New Revision: 6777

URL: http://svn.erp5.org?rev=6777&view=rev
Log:
check person_module is present before reindexing it

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml?rev=6777&r1=6776&r2=6777&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml Tue Apr 18 13:08:46 2006
@@ -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 @@
                             <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>




More information about the Erp5-report mailing list