ERP5Storage: fix allDocs's sort_on parameter handling
Showing
... | @@ -481,7 +481,8 @@ | ... | @@ -481,7 +481,8 @@ |
parsed_query, | parsed_query, | ||
sub_query, | sub_query, | ||
result_list, | result_list, | ||
local_roles; | local_roles, | ||
tmp_list = []; | |||
if (options.query) { | if (options.query) { | ||
parsed_query = jIO.QueryFactory.create(options.query); | parsed_query = jIO.QueryFactory.create(options.query); | ||
... | @@ -523,6 +524,13 @@ | ... | @@ -523,6 +524,13 @@ |
} | } | ||
} | } | ||
if (options.sort_on) { | |||
for (i = 0; i < options.sort_on.length; i += 1) { | |||
tmp_list.push(JSON.stringify(options.sort_on[i])); | |||
} | |||
options.sort_on = tmp_list; | |||
|
|||
} | |||
return jIO.util.ajax({ | return jIO.util.ajax({ | ||
"type": "GET", | "type": "GET", | ||
"url": UriTemplate.parse(site_hal._links.raw_search.href) | "url": UriTemplate.parse(site_hal._links.raw_search.href) | ||
... | ... |