some fixes
This commit is contained in:
parent
3296d4b417
commit
dadffcb784
@ -285,11 +285,6 @@ static PyObject * PyThing_setStateValue(PyThing* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
StateTypeId stateTypeId = StateTypeId(stateTypeIdStr);
|
StateTypeId stateTypeId = StateTypeId(stateTypeIdStr);
|
||||||
StateType stateType = self->thingClass->stateTypes().findById(stateTypeId);
|
|
||||||
if (!stateType.isValid()) {
|
|
||||||
PyErr_SetString(PyExc_ValueError, QString("No state type %1 in thing class %2").arg(stateTypeId.toString()).arg(self->thingClass->name()).toUtf8());
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
QVariant value = PyObjectToQVariant(valueObj);
|
QVariant value = PyObjectToQVariant(valueObj);
|
||||||
|
|
||||||
if (self->thing != nullptr) {
|
if (self->thing != nullptr) {
|
||||||
|
|||||||
@ -65,15 +65,17 @@
|
|||||||
"id": "248c5046-847b-44d0-ab7c-684ff79197dc",
|
"id": "248c5046-847b-44d0-ab7c-684ff79197dc",
|
||||||
"name": "pyMockDiscoveryPairing",
|
"name": "pyMockDiscoveryPairing",
|
||||||
"displayName": "Python mock thing with discovery and pairing",
|
"displayName": "Python mock thing with discovery and pairing",
|
||||||
"createMethods": ["discovery"],
|
"createMethods": ["discovery", "user"],
|
||||||
"setupMethod": "userAndPassword",
|
"setupMethod": "userAndPassword",
|
||||||
"discoveryParamTypes": [
|
"discoveryParamTypes": [
|
||||||
{
|
{
|
||||||
"id": "ef5f6b90-e9d8-4e77-a14d-6725cfb07116",
|
"id": "ef5f6b90-e9d8-4e77-a14d-6725cfb07116",
|
||||||
"name": "resultCount",
|
"name": "resultCount",
|
||||||
"displayName": "Result count",
|
"displayName": "Result count",
|
||||||
"type": "int",
|
"type": "uint",
|
||||||
"defaultValue": 2
|
"defaultValue": 2,
|
||||||
|
"minValue": 0,
|
||||||
|
"maxValue": 20
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paramTypes": [
|
"paramTypes": [
|
||||||
|
|||||||
Reference in New Issue
Block a user