Commit b61705a7 authored by Nicolas Dumazet's avatar Nicolas Dumazet

* triggering on newContent is not required and actually causes issues:

  - calling the workflow when a line is added is premature, because
    the line is probably not set up correctly
  - _setResource* on the line will trigger the proper action later on
* correct typo on interaction name
* check that resource is not None



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33373 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a81191e1
......@@ -53,7 +53,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ransformationDescendant_reindexTransformationResource</string> </value>
<value> <string>TransformationDescendant_reindexTransformationResource</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
......
......@@ -59,7 +59,6 @@
<key> <string>method_id</string> </key>
<value>
<list>
<string>newContent</string>
<string>_setVariationBaseCategory.*</string>
<string>_setVersion</string>
</list>
......@@ -67,7 +66,7 @@
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
......
......@@ -61,7 +61,8 @@ while transformation.getPortalType() != "Transformation":\n
transformation = transformation.getParentValue()\n
\n
resource = transformation.getResourceValue()\n
resource.reindexObject()\n
if resource is not None:\n
resource.reindexObject()\n
</string> </value>
</item>
<item>
......@@ -103,6 +104,7 @@ resource.reindexObject()\n
<string>transformation</string>
<string>_getattr_</string>
<string>resource</string>
<string>None</string>
</tuple>
</value>
</item>
......
......@@ -53,7 +53,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>state_change[\'object\'].getResourceValue().reindexObject()\n
<value> <string>transformation = state_change[\'object\']\n
resource = transformation.getResourceValue()\n
\n
if resource is not None:\n
resource.reindexObject()\n
</string> </value>
</item>
<item>
......@@ -91,8 +95,11 @@
<value>
<tuple>
<string>state_change</string>
<string>_getattr_</string>
<string>_getitem_</string>
<string>transformation</string>
<string>_getattr_</string>
<string>resource</string>
<string>None</string>
</tuple>
</value>
</item>
......
457
\ No newline at end of file
458
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment