Skip to content

Commit

Permalink
App: fix PropertyPythonObject save to directory
Browse files Browse the repository at this point in the history
Fixes #21
  • Loading branch information
realthunder committed Sep 21, 2019
1 parent 412e316 commit 7e79e24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App/PropertyPythonObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ void PropertyPythonObject::Save (Base::Writer &writer) const
<< "\" encoded=\"yes\"/>\n";
} else if(writer.isForceXML()) {
std::string json = this->toString();
if(json.size() && json != "null") {
if(json == "null")
writer.Stream() << " value=\"null\"/>\n";
else if(json.size()) {
writer.Stream() << " cdata=\"1\">\n";
writer.beginCharStream(false) << '\n' << json << '\n';
writer.endCharStream() << '\n' << writer.ind() << "</Python>\n";
Expand Down

0 comments on commit 7e79e24

Please # to comment.