Merge pull request #9012 from wwmayer/fix_from_string

App: in PropertyPythonObject::fromString only assign a dict to __dict…
This commit is contained in:
Chris Hennes
2023-03-25 12:32:44 -05:00
committed by GitHub

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;