(sender=None, app_config=None, **kwargs)
| 35 | |
| 36 | # Run discovery with DB sync after the plugins app has been migrated |
| 37 | def _post_migrate_discover(sender=None, app_config=None, **kwargs): |
| 38 | try: |
| 39 | if app_config and getattr(app_config, 'label', None) != 'plugins': |
| 40 | return |
| 41 | from .loader import PluginManager |
| 42 | PluginManager.get().discover_plugins(sync_db=True) |
| 43 | except Exception: |
| 44 | import logging |
| 45 | logging.getLogger(__name__).exception("Plugin discovery failed in post_migrate") |
| 46 | |
| 47 | post_migrate.connect( |
| 48 | _post_migrate_discover, |
nothing calls this directly
no test coverage detected