Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
546d5ce2
Commit
546d5ce2
authored
Jun 29, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Sep 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_catalog: Add function for returning filter_dict
parent
4a75862d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+8
-4
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
546d5ce2
...
@@ -672,6 +672,9 @@ class Catalog(Folder,
...
@@ -672,6 +672,9 @@ class Catalog(Folder,
def
_clearCaches
(
self
):
def
_clearCaches
(
self
):
self
.
_cache_sequence_number
+=
1
self
.
_cache_sequence_number
+=
1
def
_getFilterDict
(
self
):
return
self
.
filter_dict
security
.
declarePrivate
(
'getSQLCatalogRoleKeysList'
)
security
.
declarePrivate
(
'getSQLCatalogRoleKeysList'
)
def
getSQLCatalogRoleKeysList
(
self
):
def
getSQLCatalogRoleKeysList
(
self
):
"""
"""
...
@@ -741,10 +744,11 @@ class Catalog(Folder,
...
@@ -741,10 +744,11 @@ class Catalog(Folder,
f
.
write
(
' </property>
\
n
'
)
f
.
write
(
' </property>
\
n
'
)
# XXX Although filters are not properties, output filters here.
# XXX Although filters are not properties, output filters here.
# XXX Ideally, filters should be properties in Z SQL Methods, shouldn't they?
# XXX Ideally, filters should be properties in Z SQL Methods, shouldn't they?
if
hasattr
(
self
,
'filter_dict'
):
filter_dict
=
self
.
_getFilterDict
()
if
filter_dict
:
filter_list
=
[]
filter_list
=
[]
for
filter_id
in
self
.
filter_dict
.
keys
():
for
filter_id
in
filter_dict
.
keys
():
filter_definition
=
self
.
filter_dict
[
filter_id
]
filter_definition
=
filter_dict
[
filter_id
]
filter_list
.
append
((
filter_id
,
filter_definition
))
filter_list
.
append
((
filter_id
,
filter_definition
))
# Sort for easy diff
# Sort for easy diff
filter_list
.
sort
(
key
=
lambda
x
:
x
[
0
])
filter_list
.
sort
(
key
=
lambda
x
:
x
[
0
])
...
@@ -1603,7 +1607,7 @@ class Catalog(Folder,
...
@@ -1603,7 +1607,7 @@ class Catalog(Folder,
with
(
noReadOnlyTransactionCache
if
disable_cache
else
with
(
noReadOnlyTransactionCache
if
disable_cache
else
readOnlyTransactionCache
)():
readOnlyTransactionCache
)():
filter_dict
=
self
.
filter_dict
filter_dict
=
self
.
_getFilterDict
()
catalogged_object_list_cache
=
{}
catalogged_object_list_cache
=
{}
for
method_name
in
method_id_list
:
for
method_name
in
method_id_list
:
# We will check if there is an filter on this
# We will check if there is an filter on this
...
...
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