App: in PropertyPythonObject::fromString only assign a dict to __dict__ attribute

This commit is contained in:
wmayer
2023-03-23 23:27:47 +01:00
parent 249829913b
commit 347729090a

View File

@@ -136,7 +136,9 @@ void PropertyPythonObject::fromString(const std::string& repr)
state.apply(args);
}
else if (this->object.hasAttr("__dict__")) {
this->object.setAttr("__dict__", res);
if (!res.isNone()) {
this->object.setAttr("__dict__", res);
}
}
else {
this->object = res;