TT#77206 accept 0/1 for boolean preferences

Change-Id: I88714c590c15c27e2421fa7e61c5b0f937ea64f1
changes/90/38390/3
Rene Krenn 6 years ago
parent 6c538c2a69
commit 93ef5083b2

@ -887,7 +887,10 @@ sub _check_pref_value {
last SWITCH;
};
/^boolean$/ && do {
$err = 1 unless JSON::is_bool($value);
unless (JSON::is_bool($value)
or (is_int($value) and ($value == 0 or $value == 1))) {
$err = 1;
}
last SWITCH;
};
# default

@ -280,6 +280,7 @@ sub _get_schema {
}
}
}
die("no provisioning.conf found\n") unless $schema;
}
}
@ -295,6 +296,7 @@ sub _get_panel_config {
last;
}
}
die("no ngcp_panel.conf found\n") unless $config;
return $config;
}

Loading…
Cancel
Save