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

Feature/skip actions #218

Merged
merged 9 commits into from
Mar 14, 2022
Merged

Conversation

paul-finary
Copy link
Contributor

@paul-finary paul-finary commented Feb 28, 2022

This PR adds a way to skip specific actions when doing operations that trigger events.

Closes #216.

Changes:

  • Added a kwarg skip_actions to all methods that trigger an action event (save, insert, replace, save_changes, validate_self):
    • Accepts Optional[List[Union[ActionDirections, str]]]: either an ActionDirection, or the name of an action
  • Exposed ActionDirections:
    • Before
    • After
  • Added tests for action events
  • Added doc for skip_actions
  • Fixed the doc for state_management (my previous PR)

@paul-finary
Copy link
Contributor Author

@roman-right Any chance you can have a look at this PR?

@roman-right
Copy link
Member

Ah, sorry. I'm unfocused these days. I'll try to take a look till this weekend, if this is not super urgent

@paul-finary
Copy link
Contributor Author

It's not, I didn't mean to be pushy, just to let you know! :)

@roman-right roman-right merged commit d087854 into BeanieODM:main Mar 14, 2022
@roman-right
Copy link
Member

Thank you for the contribution. It is in the 1.10.1 now

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.

Adding a way to skip event actions
2 participants