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
29c0d886
Commit
29c0d886
authored
Dec 08, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Only use commit as predecessor value
parent
721c8023
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
product/ERP5/Tool/CommitTool.py
product/ERP5/Tool/CommitTool.py
+3
-1
No files found.
product/ERP5/Tool/CommitTool.py
View file @
29c0d886
...
@@ -189,7 +189,9 @@ class CommitTool (BaseTool):
...
@@ -189,7 +189,9 @@ class CommitTool (BaseTool):
new_obj
=
super
(
CommitTool
,
self
).
newContent
(
id
,
**
kw
)
new_obj
=
super
(
CommitTool
,
self
).
newContent
(
id
,
**
kw
)
# Add the last commit as its predecessor
# Add the last commit as its predecessor
commit_list
=
[
l
for
l
in
self
.
objectValues
()
if
l
!=
new_obj
]
commit_list
=
[
l
for
l
in
self
.
objectValues
(
portal_type
=
'Business Commit'
)
if
l
!=
new_obj
]
latest_commit
=
max
(
commit_list
,
key
=
(
lambda
x
:
x
.
getCreationDate
()))
latest_commit
=
max
(
commit_list
,
key
=
(
lambda
x
:
x
.
getCreationDate
()))
# TODO: Add check for no latest_commit
# TODO: Add check for no latest_commit
new_obj
.
setPredecessorValue
(
latest_commit
)
new_obj
.
setPredecessorValue
(
latest_commit
)
...
...
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