don't validate variable in _getvalue
This commit is contained in:
parent
c32afed522
commit
9a5b8a5f63
|
@ -124,11 +124,11 @@ class Values(object):
|
||||||
force_default = 'frozen' in self_properties and \
|
force_default = 'frozen' in self_properties and \
|
||||||
'force_default_on_freeze' in self_properties
|
'force_default_on_freeze' in self_properties
|
||||||
# not default value
|
# not default value
|
||||||
is_default = self._is_default_owner(opt, path, session,
|
if index is None or not opt.impl_is_master_slaves('slave'):
|
||||||
validate_properties=False,
|
_index = None
|
||||||
validate_meta=False,
|
else:
|
||||||
self_properties=self_properties,
|
_index = index
|
||||||
index=index)
|
is_default = self._p_.getowner(path, owners.default, session, only_default=True, index=_index) == owners.default
|
||||||
if not is_default and not force_default:
|
if not is_default and not force_default:
|
||||||
if opt.impl_is_master_slaves('slave'):
|
if opt.impl_is_master_slaves('slave'):
|
||||||
return self._p_.getvalue(path, session, index)
|
return self._p_.getvalue(path, session, index)
|
||||||
|
@ -515,7 +515,8 @@ class Values(object):
|
||||||
return owners.default
|
return owners.default
|
||||||
if validate_properties:
|
if validate_properties:
|
||||||
value = self._get_cached_value(opt, path, True, force_permissive, None, True,
|
value = self._get_cached_value(opt, path, True, force_permissive, None, True,
|
||||||
self_properties=self_properties, session=session)
|
self_properties=self_properties, session=session,
|
||||||
|
index=index)
|
||||||
if isinstance(value, Exception):
|
if isinstance(value, Exception):
|
||||||
raise value
|
raise value
|
||||||
|
|
||||||
|
@ -578,8 +579,6 @@ class Values(object):
|
||||||
def _is_default_owner(self, opt, path, session, validate_properties=True,
|
def _is_default_owner(self, opt, path, session, validate_properties=True,
|
||||||
validate_meta=True, self_properties=undefined,
|
validate_meta=True, self_properties=undefined,
|
||||||
index=None, force_permissive=False):
|
index=None, force_permissive=False):
|
||||||
if not opt.impl_is_master_slaves('slave'):
|
|
||||||
index = None
|
|
||||||
d = self._getowner(opt, path, session, validate_properties=validate_properties,
|
d = self._getowner(opt, path, session, validate_properties=validate_properties,
|
||||||
validate_meta=validate_meta,
|
validate_meta=validate_meta,
|
||||||
self_properties=self_properties, only_default=True,
|
self_properties=self_properties, only_default=True,
|
||||||
|
|
Loading…
Reference in New Issue