From 1f6e52138a5caa4af7777235f7f1ef2091db3d90 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 01:10:36 +1000 Subject: [PATCH] Plugin reload fix (#7361) (#7362) - call registry.check_reload when registering an event - ensure that latest versions of plugins are loaded (cherry picked from commit 5577a086c9c4fc18e65adaee9c928b217c9a1f0f) Co-authored-by: Oliver --- src/backend/InvenTree/plugin/base/event/events.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/InvenTree/plugin/base/event/events.py b/src/backend/InvenTree/plugin/base/event/events.py index eaaa1bfd96..8206c72d73 100644 --- a/src/backend/InvenTree/plugin/base/event/events.py +++ b/src/backend/InvenTree/plugin/base/event/events.py @@ -60,6 +60,9 @@ def register_event(event, *args, **kwargs): # Determine if there are any plugins which are interested in responding if settings.PLUGIN_TESTING or InvenTreeSetting.get_setting('ENABLE_PLUGINS_EVENTS'): + # Check if the plugin registry needs to be reloaded + registry.check_reload() + with transaction.atomic(): for slug, plugin in registry.plugins.items(): if not plugin.mixin_enabled('events'):