Skip to content

Commit

Permalink
Set right default type
Browse files Browse the repository at this point in the history
  • Loading branch information
boutinb committed Jun 19, 2024
1 parent 4a9e6f6 commit d289dc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion QMLComponents/boundcontrols/boundcontrolterms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,22 +208,29 @@ Json::Value BoundControlTerms::createJson() const
}
}
valuePart.append(row);
typesPart.append(columnTypeToString(term.type()));
}
}
else if (_isSingleRow)
{
valuePart = (terms.size() > 0) ? terms.at(0).asString() : "";
typesPart = columnTypeToString((terms.size() > 0) ? terms.at(0).type() : columnType::unknown);
}
else
{
valuePart = Json::arrayValue;
for (const Term& term : terms)
{
valuePart.append(term.asString());
typesPart.append(columnTypeToString(term.type()));
}
}



Json::Value result = Json::objectValue;
result["value"] = valuePart;
result["types"] = _getTypes();
result["types"] = typesPart;

return result;
}
Expand Down

0 comments on commit d289dc1

Please sign in to comment.