Commit 7b07b5b3 authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[hal_json] Send only 1000 UIDS max over the wire

parent 72c4d59d
...@@ -222,9 +222,9 @@ if len(extra_param.get("uids", ())) >= 1000 or extra_param.get("query", MARKER) ...@@ -222,9 +222,9 @@ if len(extra_param.get("uids", ())) >= 1000 or extra_param.get("query", MARKER)
keep_items=extra_param, keep_items=extra_param,
form_data=form_data) form_data=form_data)
elif len(extra_param.get("uids", ())) >= 1000: elif len(extra_param.get("uids", ())) >= 1000:
# no force-submit and no update so we cut the UIDS # remove UIDS from the extra_param to force re-computation because the
kw['uids'] = extra_param['uids'][:1000] # query will be the same but UIDS should change
del extra_param['uids'] # remove UIDS from the extra_param to force re-computation del extra_param['uids']
# if dialog_category is object_search, then edit the selection # if dialog_category is object_search, then edit the selection
if dialog_category == "object_search" : if dialog_category == "object_search" :
......
...@@ -1108,7 +1108,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti ...@@ -1108,7 +1108,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
method_args = selectKwargsForCallable(getattr(traversed_document, form.action), {}, {'uids': None}) method_args = selectKwargsForCallable(getattr(traversed_document, form.action), {}, {'uids': None})
if "uids" in method_args: if "uids" in method_args:
extra_param_json["uids"] = [int(getattr(document, "uid")) extra_param_json["uids"] = [int(getattr(document, "uid"))
for document in traversed_document.Base_searchUsingListbox(last_listbox, query or extra_param_json.get("query", None))] for document in traversed_document.Base_searchUsingListbox(last_listbox, query or extra_param_json.get("query", None), limit=1000)]
if query is not None: if query is not None:
extra_param_json["query"] = query extra_param_json["query"] = query
else: else:
......
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