-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels