Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix current_state check in ImplementationWrapper._pre_transition_checks #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gagaro
Copy link

@Gagaro Gagaro commented Apr 5, 2022

I had an issue when upgrading to Django 3.2, probably because of the memory isolation of setUpTestData objects.

The issue was that I had a StateWrapper instead of a State object during _pre_transition_checks, which caused an error even if I had the correct state for the transition.

Another issuer was that State instance were not considered equal, probably because they were copied.

The fixes I did are to compare State by name, and to get the State instance inside the StateWrapper if we need to.

Thanks for reviewing this PR 👍 .

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.

1 participant