Skip to content

Commit

Permalink
Plugin reload fix (#7361)
Browse files Browse the repository at this point in the history
- call registry.check_reload when registering an event
- ensure that latest versions of plugins are loaded

(cherry picked from commit 5577a08)
  • Loading branch information
SchrodingersGat committed May 27, 2024
1 parent e8c9ec0 commit 4cef0f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/InvenTree/plugin/base/event/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 4cef0f9

Please sign in to comment.