Skip to content

Conversation

pfouque
Copy link
Member

@pfouque pfouque commented Jun 25, 2025

Fixes #53

When a transition was declaring a RETURN_VALUE (or GET_STATE) as target_state, and a wildcard source ("*" or "+") only the source was poupulated and the target wasn't.



class TestExceptTargetTransitionShortcut(models.Model):
class ExceptTargetTransition(models.Model):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve pytest warning about this misleading model name

Copy link

codecov bot commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
...jango_fsm/management/commands/graph_transitions.py 84.40% <100.00%> (+2.75%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace transition with a representative set of possibilities

Comment on lines -38 to -43
if transition.source == "*":
any_targets.add((transition.target, transition.name))
elif transition.source == "+":
any_except_targets.add((transition.target, transition.name))
else:
_targets = (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main change: Populate targets even if source is "*" or "+".

@pfouque pfouque marked this pull request as ready for review June 25, 2025 07:47
@pfouque pfouque merged commit 04be14b into main Jun 25, 2025
9 checks passed
@pfouque pfouque deleted the fix_graph_transition_command branch June 25, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

graph_transition Command doesn't work with RETURN_VALUE
1 participant