some fixes

pull/341/head
Michael Zanetti 2020-07-06 14:17:52 +02:00
parent 3296d4b417
commit dadffcb784
2 changed files with 5 additions and 8 deletions

View File

@ -285,11 +285,6 @@ static PyObject * PyThing_setStateValue(PyThing* self, PyObject* args)
}
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);
if (self->thing != nullptr) {

View File

@ -65,15 +65,17 @@
"id": "248c5046-847b-44d0-ab7c-684ff79197dc",
"name": "pyMockDiscoveryPairing",
"displayName": "Python mock thing with discovery and pairing",
"createMethods": ["discovery"],
"createMethods": ["discovery", "user"],
"setupMethod": "userAndPassword",
"discoveryParamTypes": [
{
"id": "ef5f6b90-e9d8-4e77-a14d-6725cfb07116",
"name": "resultCount",
"displayName": "Result count",
"type": "int",
"defaultValue": 2
"type": "uint",
"defaultValue": 2,
"minValue": 0,
"maxValue": 20
}
],
"paramTypes": [