django-fsm icon indicating copy to clipboard operation
django-fsm copied to clipboard

🐛 A PR with tests to show how transition defined

Open simkimsia opened this issue 5 years ago • 1 comments

at abstract class can have problems with at the child models

simkimsia avatar Oct 07 '20 15:10 simkimsia

@kmmbvnr I created this PR it has a test case that shows how I am using django-fsm. I am unsure if this usecase is within scope.

Essentially, the FSMField's state_choices are defined at the child models. The transition method is defined at the parent abstract model.

When the transition occurs, the state is correctly changed but the wrong proxy was selected.

If I define the transition method at the child model, the situation won't occur. Of course this means repeated definition. Which is not ideal.

let me know how I can make this error more clear via the test cases.

image

simkimsia avatar Oct 07 '20 16:10 simkimsia