diff --git a/InvenTree/plugin/registry.py b/InvenTree/plugin/registry.py index 6f37c7d720..5ddd9857af 100644 --- a/InvenTree/plugin/registry.py +++ b/InvenTree/plugin/registry.py @@ -25,6 +25,7 @@ from maintenance_mode.core import (get_maintenance_mode, maintenance_mode_on, set_maintenance_mode) from InvenTree.config import get_setting +from InvenTree.ready import canAppAccessDatabase from .helpers import (IntegrationPluginError, get_entrypoints, get_plugins, handle_error, log_error) @@ -166,6 +167,11 @@ class PluginsRegistry: logger.debug('Finished loading plugins') + # Trigger plugins_loaded event + if canAppAccessDatabase(): + from plugin.events import trigger_event + trigger_event('plugins_loaded') + def unload_plugins(self, force_reload: bool = False): """Unload and deactivate all IntegrationPlugins.