Commit b9cc1896 authored by Nicolas Delaby's avatar Nicolas Delaby

This script is now obsoleted, because if getPropertyDictFromContent return

a different portal_type, the Event will migrate to this portal_type during
discoverMetatada process.
Contribution Predicates must focus on filename, content_type and
content_type guessed from data criterions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41858 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 432d5b64
......@@ -66,9 +66,7 @@
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple>
<string>IngestionFile_findTypeNameForEvent</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Document import newTempEvent\n
\n
event = newTempEvent(context, \'subobject\', data=context.getData())\n
\n
# First, try to find portal type from content.\n
portal_type = event.getPropertyDictFromContent().get(\'portal_type\', None)\n
\n
if portal_type is not None:\n
return portal_type\n
\n
# If we cannot find portal type from content, return default one defined in\n
# predicate\n
return predicate.getDestinationPortalType()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>predicate</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>IngestionFile_findTypeNameForEvent</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
515
\ No newline at end of file
516
\ 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