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
Thomas Gambier
erp5
Commits
2f05fe1b
Commit
2f05fe1b
authored
Mar 12, 2012
by
Łukasz Nowak
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid walking the whole workflow history.
parent
834d4502
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+3
-1
No files found.
product/ERP5Type/Base.py
View file @
2f05fe1b
...
@@ -3171,7 +3171,9 @@ class Base( CopyContainer,
...
@@ -3171,7 +3171,9 @@ class Base( CopyContainer,
history
=
wf
.
getInfoFor
(
self
,
'history'
,
None
)
history
=
wf
.
getInfoFor
(
self
,
'history'
,
None
)
except
KeyError
:
except
KeyError
:
history
=
None
history
=
None
if
history
is
not
None
and
len
(
history
):
# as WorkflowHistoryList.__len__ implementation has to walk whole
# workflow check that there is something in history in simpler way
if
isinstance
(
history
,
list
)
and
history
:
date
=
history
[
-
1
].
get
(
'time'
,
None
)
date
=
history
[
-
1
].
get
(
'time'
,
None
)
# Then get the last line of edit_workflow
# Then get the last line of edit_workflow
if
date
>
max_date
:
if
date
>
max_date
:
...
...
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