2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

Plugin reload fix (#7361)

- call registry.check_reload when registering an event
- ensure that latest versions of plugins are loaded
This commit is contained in:
Oliver
2024-05-28 01:06:08 +10:00
committed by GitHub
parent eb3c8dd255
commit 5577a086c9

View File

@ -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'):