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

fixtures: ensure db blocker is always restored #1150

Merged
merged 2 commits into from
Sep 28, 2024
Merged

Conversation

bluetech
Copy link
Member

As the code is written currently, it's possible the restore is not called in case of exception. Use the context manager to ensure that it does.

This is not to fix an observed issue, just a fix from reviewing the code.

Also took the chance to update the django_db_blocker docstring a bit.

As the code is written currently, it's possible the `restore` is not
called in case of exception. Use the context manager to ensure that it
does.

This is not to fix an observed issue, just a fix from reviewing the
code.
Note, this is not used in the docs.
@bluetech bluetech merged commit 23adcbe into main Sep 28, 2024
17 checks passed
@bluetech bluetech deleted the blocker-always-restore branch September 28, 2024 15:59
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