Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
7b07b5b3
Commit
7b07b5b3
authored
May 14, 2018
by
Tomáš Peterka
Committed by
Tomáš Peterka
May 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[hal_json] Send only 1000 UIDS max over the wire
parent
72c4d59d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
...portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
+3
-3
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+1
-1
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
View file @
7b07b5b3
...
@@ -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"
:
...
...
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
7b07b5b3
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment