1. Ian George
  2. django-statemachine


Ian George  committed 7f8240f

Passing wrong state when calling state.enter

  • Participants
  • Parent commits 5904b87
  • Branches default

Comments (0)

Files changed (1)

File statemachine/fsm.py

View file
  • Ignore whitespace
         Runs an entry action if it is set
+        print exited_state.name, self.name
         if self.entry_action:
             return self.entry_action(exited_state, *args, **kwargs)
         #TODO: this needs to be transactional, shouldn't exit unless it
         #can enter
         exiting_state.exit(entering_state, *args, **kwargs)
-        entering_state.enter(entering_state, *args, **kwargs)
+        entering_state.enter(exiting_state, *args, **kwargs)
         self.__state = new_state