Commit 1ecc04a5 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

ERP5Storage: buildQuery do not modify sort_on part of the input query

parent 45735138
...@@ -496,7 +496,7 @@ ...@@ -496,7 +496,7 @@
sub_query, sub_query,
result_list, result_list,
local_roles, local_roles,
tmp_list = []; sort_list = [];
if (options.query) { if (options.query) {
parsed_query = jIO.QueryFactory.create(options.query); parsed_query = jIO.QueryFactory.create(options.query);
...@@ -540,9 +540,8 @@ ...@@ -540,9 +540,8 @@
if (options.sort_on) { if (options.sort_on) {
for (i = 0; i < options.sort_on.length; i += 1) { for (i = 0; i < options.sort_on.length; i += 1) {
tmp_list.push(JSON.stringify(options.sort_on[i])); sort_list.push(JSON.stringify(options.sort_on[i]));
} }
options.sort_on = tmp_list;
} }
return jIO.util.ajax({ return jIO.util.ajax({
...@@ -553,7 +552,7 @@ ...@@ -553,7 +552,7 @@
// XXX Force erp5 to return embedded document // XXX Force erp5 to return embedded document
select_list: options.select_list || ["title", "reference"], select_list: options.select_list || ["title", "reference"],
limit: options.limit, limit: options.limit,
sort_on: options.sort_on, sort_on: sort_list,
local_roles: local_roles local_roles: local_roles
}), }),
"xhrFields": { "xhrFields": {
......
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