Allow to have boolean as states value
This commit is contained in:
1 parent
dee1f99c73
commit
84b0c7ebbf
1 file changed
+4
-3
@@ -28,10 +28,11 @@ def states_validate(value):
|
||||
for state in value:
|
||||
if state == 'icon':
|
||||
continue
|
||||
assert isinstance(value[state], PYSON), \
|
||||
assert isinstance(value[state], (bool, PYSON)), \
|
||||
'values of states must be PYSON'
|
||||
assert value[state].types() == set([bool]), \
|
||||
'values of states must return boolean'
|
||||
if hasattr(value[state], 'types'):
|
||||
assert value[state].types() == set([bool]), \
|
||||
'values of states must return boolean'
|
||||
|
||||
def on_change_validate(value):
|
||||
if value:
|
||||
|
||||
Reference in new issue
Block a user