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

Hooking into transitions #78

Open
CodeWithOz opened this issue Apr 19, 2023 · 1 comment
Open

Hooking into transitions #78

CodeWithOz opened this issue Apr 19, 2023 · 1 comment

Comments

@CodeWithOz
Copy link

Is there any functionality to hook into transitions and execute some logic when the transition occurs?

@Swamii
Copy link
Contributor

Swamii commented Apr 19, 2023

Hello. No, it's not possible to hook into the actual transition on a database/model layer. You could override this method to possibly execute something when we check if a transition is possible https://github.com/5monkeys/django-enumfield/blob/master/django_enumfield/enum.py#L213 - but that method can be called from many places.

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

No branches or pull requests

2 participants