Commit ca6e3171 authored by Tristan Cavelier's avatar Tristan Cavelier

gidstorage get returns wrong id -> fixed

parent 73148a55
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
that.get = function (command) { that.get = function (command) {
setTimeout(function () { setTimeout(function () {
var gid_object, complex_query; var gid_object, complex_query;
gid_object = gidParse(command.cloneDoc()._id, priv.constraints); gid_object = gidParse(command.getDocId(), priv.constraints);
if (gid_object === undefined) { if (gid_object === undefined) {
return that.error({ return that.error({
"status": 400, "status": 400,
...@@ -412,6 +412,7 @@ ...@@ -412,6 +412,7 @@
"reason": "missing" "reason": "missing"
}); });
} }
response.rows[0].doc._id = command.getDocId();
return that.success(response.rows[0].doc); return that.success(response.rows[0].doc);
}, function (err) { }, function (err) {
err.message = "Cannot get document"; err.message = "Cannot get document";
......
Markdown is supported
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