rsinger86/django-lifecycle

Use multiple hooks as AND condition

ayanami142 opened this issue · 1 comments

How to execute method only if all hooks conditions is True?
For example

@hook(AFTER_SAVE, when='foo', was='bar')
@hook(AFTER_SAVE, when='something', is_now='value')
def my_method(self):
pass

I tested this, but my_method runs when only one of the hook condition is True as OR condition

Sorry, didn't check the documentation with Utility Methods