Commit 2805158c authored by Julien Muchembled's avatar Julien Muchembled

Fix 'type_provider_list' attribute of types tool

This fixes TestCrmReports.testEventActivity

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43491 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cb96aee1
...@@ -587,6 +587,8 @@ class BaseTemplateItem(Implicit, Persistent): ...@@ -587,6 +587,8 @@ class BaseTemplateItem(Implicit, Persistent):
attr_set.update(('_arg', 'template')) attr_set.update(('_arg', 'template'))
elif interfaces.IIdGenerator.providedBy(obj): elif interfaces.IIdGenerator.providedBy(obj):
attr_set.update(('last_max_id_dict', 'last_id_dict')) attr_set.update(('last_max_id_dict', 'last_id_dict'))
elif classname == 'Types Tool' and klass.__module__ == 'erp5.portal_type':
attr_set.add('type_provider_list')
else: else:
obj = self.migrateToPortalTypeClass(obj) obj = self.migrateToPortalTypeClass(obj)
...@@ -1444,8 +1446,9 @@ class ToolTemplateItem(PathTemplateItem): ...@@ -1444,8 +1446,9 @@ class ToolTemplateItem(PathTemplateItem):
portal = context.getPortalObject() portal = context.getPortalObject()
types_tool = portal.portal_types types_tool = portal.portal_types
for type_container_id, obj in self._objects.iteritems(): for type_container_id, obj in self._objects.iteritems():
if interfaces.ITypeProvider.providedBy(obj) and \ if (interfaces.ITypeProvider.providedBy(obj) and
type_container_id not in types_tool.type_provider_list: type_container_id != types_tool.id and
type_container_id not in types_tool.type_provider_list):
types_tool.type_provider_list = tuple(types_tool.type_provider_list) + \ types_tool.type_provider_list = tuple(types_tool.type_provider_list) + \
(type_container_id,) (type_container_id,)
......
...@@ -32,15 +32,6 @@ ...@@ -32,15 +32,6 @@
<key> <string>last_id</string> </key> <key> <string>last_id</string> </key>
<value> <string>2</string> </value> <value> <string>2</string> </value>
</item> </item>
<item>
<key> <string>type_provider_list</string> </key>
<value>
<tuple>
<string>portal_solvers</string>
<string>portal_types</string>
</tuple>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
40892 40893
\ No newline at end of file \ 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