[Erp5-report] r40142 jm - in /erp5/trunk/bt5/erp5_simulation: SkinTemplateItem/portal_skins...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 9 20:10:52 CET 2010


Author: jm
Date: Tue Nov  9 20:10:51 2010
New Revision: 40142

URL: http://svn.erp5.org?rev=40142&view=rev
Log:
Workaround to make erp5_simulation_test installable when some portal types are missing

Modified:
    erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/RuleMixin_asPredicate.xml
    erp5/trunk/bt5/erp5_simulation/bt/revision

Modified: erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/RuleMixin_asPredicate.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/RuleMixin_asPredicate.xml?rev=40142&r1=40141&r2=40142&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/RuleMixin_asPredicate.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/RuleMixin_asPredicate.xml [utf8] Tue Nov  9 20:10:51 2010
@@ -50,7 +50,12 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>return context.generatePredicate(criterion_property_list=("start_date",))\n
+            <value> <string>if context.getTypeInfo() is None:\n
+  # Workaround: unit tests don\'t always install all the BT that\n
+  # provide the portal types used by \'erp5_simulation_test\' BT.\n
+  return context\n
+\n
+return context.generatePredicate(criterion_property_list=("start_date",))\n
 </string> </value>
         </item>
         <item>
@@ -89,6 +94,7 @@
                           <tuple>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>None</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_simulation/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation/bt/revision?rev=40142&r1=40141&r2=40142&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation/bt/revision [utf8] Tue Nov  9 20:10:51 2010
@@ -1 +1 @@
-145
\ No newline at end of file
+146
\ No newline at end of file




More information about the Erp5-report mailing list