Skip to content

Commit

Permalink
update changelog, indicate return value for get_graph in `remove_tr…
Browse files Browse the repository at this point in the history
…ansitions`
  • Loading branch information
aleneum committed May 13, 2024
1 parent 32397b8 commit f0dcaf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- PR #633: Remove surrounding whitespace from docstrings (thanks @artofhuman)
- PR #665: Add `on_final` to `Machine` and `NestedState` constructor and `final` to `State`. Callbacks passed to `on_final` will be executed when a State with `final=True` is entered or all children of a parallel state are final.
- Bug #626: Process exceptions with `Machine.on_exception` in may_<trigger> as well (thanks @match1)
- PR #666: Improved handling of removing transitions for `GraphMachine` and `HiearachicalMachine` (thanks @drpjm)
- Typing:
+ Made state, event and machine property mandatory in (Nested)EventData
+ Transition.dest may be None
Expand Down
3 changes: 2 additions & 1 deletion transitions/extensions/diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ def add_transition(self, trigger, source, dest, conditions=None, unless=None, be

def remove_transition(self, trigger, source="*", dest="*"):
super(GraphMachine, self).remove_transition(trigger, source, dest)
# update all model graphs since some transitions might be gone
for model in self.models:
model.get_graph(force_new=True)
_ = model.get_graph(force_new=True)


class NestedGraphTransition(TransitionGraphSupport, NestedTransition):
Expand Down

0 comments on commit f0dcaf6

Please sign in to comment.