many improvment
This commit is contained in:
@ -202,14 +202,9 @@ class OptionDescription(BaseOption, StorageOptionDescription):
|
||||
self._set_readonly(False)
|
||||
|
||||
|
||||
def impl_build_force_store_values(self, config):
|
||||
def impl_build_force_store_values(self, config, force_store_values):
|
||||
session = config._impl_values._p_.getsession()
|
||||
for subpath, option in self._cache_force_store_values:
|
||||
value = config.cfgimpl_get_values()._get_cached_value(option,
|
||||
path=subpath,
|
||||
validate=False,
|
||||
trusted_cached_properties=False,
|
||||
validate_properties=True)
|
||||
if option.impl_is_master_slaves('slave'):
|
||||
# problem with index
|
||||
raise ConfigError(_('a slave ({0}) cannot have '
|
||||
@ -217,8 +212,14 @@ class OptionDescription(BaseOption, StorageOptionDescription):
|
||||
if option._is_subdyn():
|
||||
raise ConfigError(_('a dynoption ({0}) cannot have '
|
||||
'force_store_value property').format(subpath))
|
||||
config._impl_values._p_.setvalue(subpath, value,
|
||||
owners.forced, None, session)
|
||||
if force_store_values and not config._impl_values._p_.hasvalue(subpath, session):
|
||||
value = config.cfgimpl_get_values()._get_cached_value(option,
|
||||
path=subpath,
|
||||
validate=False,
|
||||
trusted_cached_properties=False,
|
||||
validate_properties=True)
|
||||
config._impl_values._p_.setvalue(subpath, value,
|
||||
owners.forced, None, session)
|
||||
|
||||
# ____________________________________________________________
|
||||
def impl_set_group_type(self, group_type):
|
||||
|
Reference in New Issue
Block a user