Hi,
With the following use case:
class Parent(xworkflows.WorkflowEnabled):
@xworkflows.transition()
def accept(self):
# Default behaviour
class Child(Parent):
@xworkflows.transition()
def accept(self):
if child_condition:
# Child behaviour
return super(Child, self).accept()
child = Child()
child.accept()
If child_condition is not met, it calls the original accept method. But it leads to two "accept" transitions in the log, the second one being already from the "accepted" state, although it's not allowed by the workflow.
I found out I can access the undecorated Parent.accept method via return super(Child, self).accept.func().
The real issue happened on a Django model with django-xworkflows.
Hi,
With the following use case:
If
child_conditionis not met, it calls the originalacceptmethod. But it leads to two "accept" transitions in the log, the second one being already from the "accepted" state, although it's not allowed by the workflow.I found out I can access the undecorated
Parent.acceptmethod viareturn super(Child, self).accept.func().The real issue happened on a Django model with django-xworkflows.