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
Laurent S
erp5
Commits
30ad5114
Commit
30ad5114
authored
Mar 26, 2013
by
Vincent Pelletier
Committed by
Kazuhiko Shiozaki
Mar 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move a few invariants out of loop.
parent
6910ef67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
product/ERP5Type/patches/WorkflowTool.py
product/ERP5Type/patches/WorkflowTool.py
+4
-3
No files found.
product/ERP5Type/patches/WorkflowTool.py
View file @
30ad5114
...
...
@@ -182,6 +182,8 @@ def groupWorklistListByCondition(worklist_dict, sql_catalog,
# One entry per worklist group, based on filter criterions.
worklist_set_dict
=
{}
metadata_dict
=
{}
catalog_security_uid_groups_columns_dict
=
\
sql_catalog
.
getSQLCatalogSecurityUidGroupsColumnsDict
()
for
workflow_id
,
worklist
in
worklist_dict
.
iteritems
():
for
worklist_id
,
worklist_match_dict
in
worklist
.
iteritems
():
workflow_worklist_key
=
'/'
.
join
((
workflow_id
,
worklist_id
))
...
...
@@ -207,8 +209,6 @@ def groupWorklistListByCondition(worklist_dict, sql_catalog,
for
key
,
value
in
local_role_column_dict
.
items
():
worklist_match_dict
[
key
]
=
[
value
]
catalog_security_uid_groups_columns_dict
=
\
sql_catalog
.
getSQLCatalogSecurityUidGroupsColumnsDict
()
for
local_roles_group_id
,
uid_list
in
uid_dict
.
iteritems
():
role_column_dict
[
catalog_security_uid_groups_columns_dict
[
local_roles_group_id
]]
=
uid_list
...
...
@@ -609,6 +609,8 @@ def WorkflowTool_refreshWorklistCache(self):
sql_catalog
.
getSQLCatalogSecurityUidGroupsColumnsDict
().
values
())
+
\
[
x
[
1
]
for
x
in
sql_catalog
.
getSQLCatalogRoleKeysList
()]
+
\
[
x
[
1
]
for
x
in
sql_catalog
.
getSQLCatalogLocalRoleKeysList
()]
for
security_column_id
in
security_column_id_list
:
assert
security_column_id
in
table_column_id_set
(
worklist_list_grouped_by_condition
,
worklist_metadata
)
=
\
groupWorklistListByCondition
(
worklist_dict
=
worklist_dict
,
...
...
@@ -622,7 +624,6 @@ def WorkflowTool_refreshWorklistCache(self):
assert
criterion_id
in
table_column_id_set
for
security_column_id
in
security_column_id_list
:
assert
security_column_id
not
in
total_criterion_id_list
assert
security_column_id
in
table_column_id_set
total_criterion_id_list
.
append
(
security_column_id
)
group_by_expression
=
', '
.
join
(
total_criterion_id_list
)
assert
COUNT_COLUMN_TITLE
not
in
total_criterion_id_list
...
...
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