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
alecs_myu
erp5
Commits
5dd7e49d
Commit
5dd7e49d
authored
Nov 02, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow call to 'SimulableMixin.updateSimulation' even after its before_commit hook was called
parent
a1a842b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
product/ERP5/mixin/rule.py
product/ERP5/mixin/rule.py
+5
-2
No files found.
product/ERP5/mixin/rule.py
View file @
5dd7e49d
...
@@ -498,7 +498,8 @@ class SimulableMixin(Base):
...
@@ -498,7 +498,8 @@ class SimulableMixin(Base):
kw
,
ignore
=
tv
[
key
]
kw
,
ignore
=
tv
[
key
]
kw
.
update
(
item_list
)
kw
.
update
(
item_list
)
except
KeyError
:
except
KeyError
:
ignore
=
set
()
ignore_key
=
key
+
(
'ignore'
,)
ignore
=
tv
.
pop
(
ignore_key
,
set
())
tv
[
key
]
=
kw
,
ignore
tv
[
key
]
=
kw
,
ignore
def
before_commit
():
def
before_commit
():
if
kw
:
if
kw
:
...
@@ -511,7 +512,9 @@ class SimulableMixin(Base):
...
@@ -511,7 +512,9 @@ class SimulableMixin(Base):
after_tag
=
'built:'
+
path
,
# see SimulatedDeliveryBuilder
after_tag
=
'built:'
+
path
,
# see SimulatedDeliveryBuilder
priority
=
3
,
priority
=
3
,
).
_updateSimulation
(
**
kw
)
).
_updateSimulation
(
**
kw
)
tv
[
key
]
=
None
# disallow further calls to 'updateSimulation' for self
del
tv
[
key
]
ignore
.
update
(
kw
)
tv
[
ignore_key
]
=
ignore
transaction
.
get
().
addBeforeCommitHook
(
before_commit
)
transaction
.
get
().
addBeforeCommitHook
(
before_commit
)
for
k
,
v
in
item_list
:
for
k
,
v
in
item_list
:
if
not
v
:
if
not
v
:
...
...
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