[Erp5-report] r8330 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 6 15:04:35 CEST 2006
Author: seb
Date: Thu Jul 6 15:04:27 2006
New Revision: 8330
URL: http://svn.erp5.org?rev=8330&view=rev
Log:
Fixed a bug, sometimes the assignment was not found
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromAssignment.xml
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromAssignment.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromAssignment.xml?rev=8330&r1=8329&r2=8330&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromAssignment.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Type_getSecurityCategoryFromAssignment.xml Thu Jul 6 15:04:27 2006
@@ -83,7 +83,10 @@
category_list = []\n
\n
person_module = context.portal_url.getPortalObject().getDefaultModule(\'Person\')\n
-person_object_list = person_module.searchFolder(portal_type=\'Person\', reference=user_name)\n
+# It is better to keep getObject(), in this script this\n
+# prevent a very strange bug, sometimes without getObject the\n
+# assignment is not found\n
+person_object_list = [x.getObject() for x in person_module.searchFolder(portal_type=\'Person\', reference=user_name)]\n
\n
if len(person_object_list) != 1:\n
if len(person_object_list) > 1:\n
@@ -168,12 +171,15 @@
<string>_getattr_</string>
<string>context</string>
<string>person_module</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>x</string>
<string>person_object_list</string>
<string>len</string>
<string>ConsistencyError</string>
<string>_getitem_</string>
<string>person_object</string>
- <string>_getiter_</string>
<string>assignment</string>
<string>category_dict</string>
<string>base_category</string>
More information about the Erp5-report
mailing list