Fix issue when using workflows transitions with the new version upload event as trigger. Thanks to Sema @Miggaten for the find and the solution.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -137,6 +137,9 @@
|
|||||||
- Improve line chart appearance. Fix mouse hover label issue.
|
- Improve line chart appearance. Fix mouse hover label issue.
|
||||||
- Add JavaScript dependency manager.
|
- Add JavaScript dependency manager.
|
||||||
- Add support for passing arguments to the OCR backend.
|
- Add support for passing arguments to the OCR backend.
|
||||||
|
- Fix issue when using workflows transitions with the new version
|
||||||
|
upload event as trigger. Thanks to Sema @Miggaten for the find and
|
||||||
|
the solution.
|
||||||
|
|
||||||
2.7.3 (2017-09-11)
|
2.7.3 (2017-09-11)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -427,7 +427,9 @@ Other changes worth mentioning
|
|||||||
- Update Chart.js version.
|
- Update Chart.js version.
|
||||||
- Improve line chart appearance. Fix issue with mouse over labels next other chart margin.
|
- Improve line chart appearance. Fix issue with mouse over labels next other chart margin.
|
||||||
- Add support for passing arguments to the OCR backend.
|
- Add support for passing arguments to the OCR backend.
|
||||||
|
- Fix issue when using workflows transitions with the new version
|
||||||
|
upload event as trigger. Thanks to Sema @Miggaten for the find and
|
||||||
|
the solution.
|
||||||
|
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ def handler_trigger_transition(sender, **kwargs):
|
|||||||
|
|
||||||
for workflow_instance in workflow_instances:
|
for workflow_instance in workflow_instances:
|
||||||
# Select the first transition that is valid for this workflow state
|
# Select the first transition that is valid for this workflow state
|
||||||
transition = list(set(trigger_transitions) & set(workflow_instance.get_transition_choices()))[0]
|
valid_transitions = list(set(trigger_transitions) & set(workflow_instance.get_transition_choices()))
|
||||||
|
if valid_transitions:
|
||||||
workflow_instance.do_transition(
|
workflow_instance.do_transition(
|
||||||
comment=_('Event trigger: %s') % EventType.get(name=action.verb).label,
|
comment=_('Event trigger: %s') % EventType.get(name=action.verb).label,
|
||||||
transition=transition
|
transition=valid_transitions[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def launch_workflow(sender, instance, created, **kwargs):
|
def launch_workflow(sender, instance, created, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user