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
Carlos Ramos Carreño
erp5
Commits
cf4f42bf
Commit
cf4f42bf
authored
Apr 03, 2019
by
Kazuhiko Shiozaki
Committed by
Kazuhiko Shiozaki
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Catalog: check with predicate test in getDocumentValueList results.
parent
4d45ffd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_getDocumentValueList.py
...alog/erp5_mysql_innodb/SQLCatalog_getDocumentValueList.py
+9
-3
No files found.
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_getDocumentValueList.py
View file @
cf4f42bf
...
@@ -79,9 +79,9 @@ try:
...
@@ -79,9 +79,9 @@ try:
strict_language
=
False
strict_language
=
False
if
all_versions
:
if
all_versions
:
if
all_languages
or
not
strict_language
:
if
all_languages
or
not
strict_language
:
re
turn
search_context
.
searchResults
(
src__
=
src__
,
**
kw
)
re
sult
=
search_context
.
searchResults
(
src__
=
src__
,
**
kw
)
else
:
else
:
re
turn
search_context
.
searchResults
(
src__
=
src__
,
language
=
language
,
**
kw
)
re
sult
=
search_context
.
searchResults
(
src__
=
src__
,
language
=
language
,
**
kw
)
else
:
else
:
group_by_list
=
set
(
kw
.
get
(
'group_by_list'
,
[]))
group_by_list
=
set
(
kw
.
get
(
'group_by_list'
,
[]))
if
all_languages
:
if
all_languages
:
...
@@ -95,12 +95,18 @@ try:
...
@@ -95,12 +95,18 @@ try:
kw
.
setdefault
(
'select_dict'
,
{}).
update
(
kw
.
setdefault
(
'select_dict'
,
{}).
update
(
(
x
.
replace
(
'.'
,
'_'
)
+
'__ext__'
,
x
)
(
x
.
replace
(
'.'
,
'_'
)
+
'__ext__'
,
x
)
for
x
in
extra_column_set
if
not
x
.
endswith
(
'__score__'
))
for
x
in
extra_column_set
if
not
x
.
endswith
(
'__score__'
))
re
turn
context
.
SQLCatalog_zGetDocumentValueList
(
search_context
=
search_context
,
re
sult
=
context
.
SQLCatalog_zGetDocumentValueList
(
search_context
=
search_context
,
language
=
language
,
language
=
language
,
strict_language
=
strict_language
,
strict_language
=
strict_language
,
all_languages
=
all_languages
,
all_languages
=
all_languages
,
src__
=
src__
,
src__
=
src__
,
kw
=
kw
)
kw
=
kw
)
test_func
=
getattr
(
search_context
,
'test'
,
None
)
if
test_func
is
None
:
return
result
else
:
result
=
[
x
.
getObject
()
for
x
in
result
]
return
[
x
for
x
in
result
if
test_func
(
x
)]
except
Unauthorized
:
except
Unauthorized
:
return
[]
return
[]
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