Commit d25345ab authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Move version priority list property to Site _properties.

Before, it was in Site _local_properties, but as this is stored in ZODB, old
sites would not have this property and would thus not allow to modify it
through 'Properties' Site tab.
parent dfa7e8b2
...@@ -242,6 +242,16 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -242,6 +242,16 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
'type':'string'}, 'type':'string'},
{ 'id':'description', { 'id':'description',
'type':'text'}, 'type':'text'},
# setProperty cannot be used for this property as it is a property
# pointing to _version_priority_list and valid_property_id doesn't
# accept property name starting with '_'. The property getter always
# returns at least erp5 version.
#
# Also, it must not be a local property as it is stored in ZODB and
# would not be displayed 'Properties' tab with old sites, thus could not
# be edited.
{ 'id': 'version_priority_list',
'type': 'lines' }
) )
title = '' title = ''
description = '' description = ''
...@@ -1749,13 +1759,6 @@ class ERP5Generator(PortalGenerator): ...@@ -1749,13 +1759,6 @@ class ERP5Generator(PortalGenerator):
# Return the fully wrapped object. # Return the fully wrapped object.
p = parent.this()._getOb(id) p = parent.this()._getOb(id)
# setProperty cannot be used for this property as it is a property object
# to _version_priority_list and valid_property_id doesn't accept property
# name starting with '_'. The property getter always returns at least erp5
# version so it only needs to be added to local properties
p._local_properties = getattr(self, '_local_properties', ()) + \
({'id': 'version_priority_list', 'type': 'lines'},)
erp5_sql_deferred_connection_string = erp5_sql_connection_string erp5_sql_deferred_connection_string = erp5_sql_connection_string
p._setProperty('erp5_catalog_storage', p._setProperty('erp5_catalog_storage',
erp5_catalog_storage, 'string') erp5_catalog_storage, 'string')
......
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