some improvemnt
This commit is contained in:
parent
e73e6322ae
commit
1d677e47ef
@ -151,9 +151,9 @@ class _Value:
|
|||||||
withwarning: bool):
|
withwarning: bool):
|
||||||
for key, option in schema['properties'].items():
|
for key, option in schema['properties'].items():
|
||||||
hidden = self.temp.get(key, {}).get('hidden', None)
|
hidden = self.temp.get(key, {}).get('hidden', None)
|
||||||
model_hidden = not self.model.get(key, {}).get('hidden', False) and \
|
model_display = not self.model.get(key, {}).get('hidden', False) and \
|
||||||
self.model.get(key, {}).get('display', True)
|
self.model.get(key, {}).get('display', True)
|
||||||
if hidden is False or (hidden is None and model_hidden):
|
if hidden is False or (hidden is None and model_display is True):
|
||||||
if option['type'] == 'object':
|
if option['type'] == 'object':
|
||||||
self._dict_walk(ret,
|
self._dict_walk(ret,
|
||||||
option,
|
option,
|
||||||
@ -283,9 +283,9 @@ class _Option:
|
|||||||
for path, schema in self.schema['properties'].items():
|
for path, schema in self.schema['properties'].items():
|
||||||
if type == 'all' or schema['type'] not in ['object', 'array']:
|
if type == 'all' or schema['type'] not in ['object', 'array']:
|
||||||
hidden = self.temp.get(path, {}).get('hidden', None)
|
hidden = self.temp.get(path, {}).get('hidden', None)
|
||||||
model_hidden = not self.model.get(path, {}).get('hidden', False) and \
|
model_display = not self.model.get(path, {}).get('hidden', False) and \
|
||||||
self.model.get(path, {}).get('display', True)
|
self.model.get(path, {}).get('display', True)
|
||||||
if hidden is False or (hidden is None and model_hidden is True):
|
if hidden is False or (hidden is None and model_display is True):
|
||||||
if schema['type'] in ['object', 'array']:
|
if schema['type'] in ['object', 'array']:
|
||||||
yield TiramisuOptionDescription(self.config,
|
yield TiramisuOptionDescription(self.config,
|
||||||
schema,
|
schema,
|
||||||
@ -344,9 +344,9 @@ class TiramisuOptionDescription(_Option):
|
|||||||
|
|
||||||
def group_type(self):
|
def group_type(self):
|
||||||
hidden = self.temp.get(self.path, {}).get('hidden', None)
|
hidden = self.temp.get(self.path, {}).get('hidden', None)
|
||||||
model_hidden = not self.model.get(self.path, {}).get('hidden', False) and \
|
model_display = not self.model.get(self.path, {}).get('hidden', False) and \
|
||||||
self.model.get(self.path, {}).get('display', True)
|
self.model.get(self.path, {}).get('display', True)
|
||||||
if hidden is False or (hidden is None and model_hidden):
|
if hidden is False or (hidden is None and model_display):
|
||||||
# FIXME
|
# FIXME
|
||||||
return 'default'
|
return 'default'
|
||||||
raise PropertiesOptionError(None, None, None, opt_type='optiondescription')
|
raise PropertiesOptionError(None, None, None, opt_type='optiondescription')
|
||||||
@ -637,7 +637,7 @@ class Config:
|
|||||||
update_last_action = True
|
update_last_action = True
|
||||||
elif index == None and action == 'delete':
|
elif index == None and action == 'delete':
|
||||||
for update in reversed(self.updates):
|
for update in reversed(self.updates):
|
||||||
if masterslaves == None and update['name'] == path or \
|
if masterslaves is None and update['name'] == path or \
|
||||||
masterslaves and path.startswith(masterslaves + '.'):
|
masterslaves and path.startswith(masterslaves + '.'):
|
||||||
del self.updates[-1]
|
del self.updates[-1]
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user