Commit 71661e59 authored by Jérome Perrin's avatar Jérome Perrin

portal types properties (allowed_content_types, hidden_content_type_list etc)

must be tuple, not list.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22672 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 827e160c
...@@ -1770,7 +1770,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): ...@@ -1770,7 +1770,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
for id in object_property_list: for id in object_property_list:
if id not in property_list: if id not in property_list:
property_list.append(id) property_list.append(id)
setattr(portal_type, self.class_property, list(property_list)) setattr(portal_type, self.class_property, tuple(property_list))
def uninstall(self, context, **kw): def uninstall(self, context, **kw):
object_path = kw.get('object_path', None) object_path = kw.get('object_path', None)
...@@ -1793,7 +1793,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): ...@@ -1793,7 +1793,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
for id in property_list: for id in property_list:
if id in original_property_list: if id in original_property_list:
original_property_list.remove(id) original_property_list.remove(id)
setattr(portal_type, self.class_property, list(original_property_list)) setattr(portal_type, self.class_property, tuple(original_property_list))
class PortalTypeHiddenContentTypeTemplateItem(PortalTypeAllowedContentTypeTemplateItem): class PortalTypeHiddenContentTypeTemplateItem(PortalTypeAllowedContentTypeTemplateItem):
......
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