Commit 2c597e5a authored by fred's avatar fred
Browse files

added a white space in the json example because of this issue...

added a white space in the json example because of this issue https://jira.mongodb.org/browse/SERVER-9414
parent 609d933f
......@@ -15,7 +15,7 @@
</div>
<div class="group">
<label class="label">Workers</label>
<textarea class="text_area" rows="10" cols="80" name="workers">{ "myworkerA" : 1, "myworkerB" : 2, "myworkerC" : 3 }</textarea>
<textarea class="text_area" rows="10" cols="80" name="workers">{ "myworkerA" : 1 , "myworkerB" : 2 , "myworkerC" : 3 }</textarea>
</div>
</div>
<div class="column right">
......
......@@ -1471,12 +1471,13 @@ void Http_admin::admin_workflow_post(QxtWebRequestEvent* event)
qDebug() << "URL : " << worker.toString();
BSONObj b_workflow;
try {
b_workflow = mongo::fromjson(worker.toString().toAscii());
try
{
b_workflow = mongo::fromjson(worker.toString().toStdString());
}
catch (mongo::MsgAssertionException &e)
{
std::cout << "e : " << e.what() << std::endl;
set_user_alert(event, errorMessage("workers's' field is not a JSON format", "error"));
redir = new QxtWebRedirectEvent( event->sessionID, event->requestID, "createworkflow", 302 );
postEvent(redir);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment