do not check unactive option if remote
This commit is contained in:
parent
70389d70cd
commit
f48878b324
|
@ -326,11 +326,11 @@ class TiramisuOptionValue(_Value):
|
||||||
def set(self, value):
|
def set(self, value):
|
||||||
type_ = self.schema['type']
|
type_ = self.schema['type']
|
||||||
leader_old_value = undefined
|
leader_old_value = undefined
|
||||||
if self.config.is_hidden(self.path, self.index):
|
remote = self.config.form.get(self.path, {}).get('remote', False)
|
||||||
|
if not remote and self.config.is_hidden(self.path, self.index):
|
||||||
raise PropertiesOptionError(None, {'disabled'}, None, opt_type='option')
|
raise PropertiesOptionError(None, {'disabled'}, None, opt_type='option')
|
||||||
if self.config.isleader(self.path):
|
if self.config.isleader(self.path):
|
||||||
leader_old_value = self.config.get_value(self.path)
|
leader_old_value = self.config.get_value(self.path)
|
||||||
remote = self.config.form.get(self.path, {}).get('remote', False)
|
|
||||||
if self.index is None and self.schema.get('isMulti', False):
|
if self.index is None and self.schema.get('isMulti', False):
|
||||||
if not isinstance(value, list):
|
if not isinstance(value, list):
|
||||||
raise ValueError('value must be a list')
|
raise ValueError('value must be a list')
|
||||||
|
@ -574,7 +574,7 @@ class ContextOption(_Option):
|
||||||
schema: Dict) -> None:
|
schema: Dict) -> None:
|
||||||
self.config = config
|
self.config = config
|
||||||
self.schema = {'properties': schema}
|
self.schema = {'properties': schema}
|
||||||
self.index = None
|
self.index = None
|
||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
path: str,
|
path: str,
|
||||||
|
@ -597,7 +597,7 @@ class ContextOwner:
|
||||||
schema: Dict) -> None:
|
schema: Dict) -> None:
|
||||||
self.config = config
|
self.config = config
|
||||||
self.schema = {'properties': schema}
|
self.schema = {'properties': schema}
|
||||||
self.index = None
|
self.index = None
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
return self.config.global_model.get('owner', 'tmp')
|
return self.config.global_model.get('owner', 'tmp')
|
||||||
|
|
Loading…
Reference in New Issue