Skip to content

Commit

Permalink
Plugin reload fix
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
  • Loading branch information
SchrodingersGat committed May 27, 2024
1 parent b7b666b commit a4831af
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 a4831af

Please sign in to comment.