Kai Diefenbach  committed 05315d9

Bugfix do_transition: take only transition of the current workflow into account.

  • Participants
  • Parent commits bf45c91

Comments (0)

Files changed (1)

File workflows/

 def do_transition(obj, transition, user):
     """Processes the passed transition to the passed object (if allowed).
+    workflow = get_workflow(obj)
     if not isinstance(transition, Transition):
-            transition = Transition.objects.get(name=transition)
+            transition = Transition.objects.get(name=transition, workflow=workflow)
         except Transition.DoesNotExist:
             return False
     # Add inheritance blocks of this state to the object
     for sib in StateInheritanceBlock.objects.filter(state=state):
-        permissions.utils.add_inheritance_block(obj, sib.permission)
+        permissions.utils.add_inheritance_block(obj, sib.permission)