Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the limit of number of items (Solved #13129)
Fix the limit of number of items to show in batch results see https://dev.plone.org/ticket/13129
- Loading branch information
ba83765
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting b_size to None would result in no pagination, which is not recommandable, imagine thousands of items loading.
Suggesting to leave b_size set to 30 and then to ask if getLimit is not None instead of if b_size is None.
ba83765
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, the only viable solution for what you said is to check if the variable getLimit is 0 and oh yes assign the value 30 agree? what do you suggest?
ba83765
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hersonrodrigues yes, I think it makes sense to check the return of getLimit() and set a default if there is no limit.
I think it would be nice if the default could be configured in the portal_registry instead of being hardcoded, but that's not essential.
ba83765
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ida27 Now, just decide if it is better to make check or change the default field limit of 1000 to 30.