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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
5b6579aa
Commit
5b6579aa
authored
Dec 07, 2023
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
searchAndActivate: sorting results was useless when activity_count=None
parent
9321cec0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+8
-4
No files found.
product/ERP5Catalog/CatalogTool.py
View file @
5b6579aa
...
@@ -1376,14 +1376,18 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
...
@@ -1376,14 +1376,18 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
group_method_cost = group_kw.get('group_method_cost', .034) # 30 objects
group_method_cost = group_kw.get('group_method_cost', .034) # 30 objects
if limit == 0:
if limit == 0:
limit = 100 * int(ceil(1 / group_method_cost))
limit = 100 * int(ceil(1 / group_method_cost))
if min_uid:
catalog_kw['min_uid'] = SimpleQuery(uid=min_uid,
comparison_operator='>')
if catalog_kw.pop('restricted', False):
if catalog_kw.pop('restricted', False):
search = self
search = self
else:
else:
search = self.unrestrictedSearchResults
search = self.unrestrictedSearchResults
r = search(sort_on=(('uid','ascending'),), limit=limit, **catalog_kw)
if limit is None:
r = search(**catalog_kw)
else:
if min_uid:
catalog_kw['min_uid'] = SimpleQuery(uid=min_uid,
comparison_operator='>')
r = search(sort_on=(('uid','ascending'),), limit=limit, **catalog_kw)
result_count = len(r)
result_count = len(r)
if result_count:
if result_count:
if result_count == limit:
if result_count == limit:
...
...
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