Skip to content

Commit

Permalink
Fix the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Feb 7, 2024
1 parent 94e89cf commit 6837ae3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions django_migrations_ci/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def pytest_configure(config):
try:
from pytest_django import plugin

blocking_manager = config.stash[plugin.blocking_manager_key]
db_unblock = config.stash[plugin.blocking_manager_key].unblock
except AttributeError:
blocking_manager = plugin._blocking_manager
# pytest-django<4.7 doesn't have `blocking_manager_key` defined,
# raising `AttributeError`.
db_unblock = plugin._blocking_manager.unblock
except ImportError:
# The pytest-django lib is not installed, do nothing and hope for the best.
# pytest-django lib is not installed, do nothing and hope for the best.
db_unblock = nullcontext
else:
db_unblock = blocking_manager.unblock

verbosity = config.option.migrateci_verbose
if verbosity is None:
Expand Down

0 comments on commit 6837ae3

Please sign in to comment.