Lazily fetch the django_evolution app.

Review Request #11875 — Created Nov. 16, 2021 and updated

chipx86
Django Evolution
release-2.x
django-evolution

After a syncdb or migrate, django_evolution.management attempts to
record new state in the database, but it only does so once the
django_evolution app and its tables have been made available in the
database. For this, it needs a reference to the app, which was being
done at module initialization.

It's possible for this code to run too early, before other apps are
properly set up, which could cause failures either fetching the app or
from some logic within the app.

To avoid this, we now lazily fetch the app the first time we need it,
caching it for future reference.

Unit tests pass.

Successfully created new databases and upgraded existing ones.

Summary
Lazily fetch the django_evolution app.
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
Loading...