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

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 5577a086c9)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot]
2024-05-28 01:10:36 +10:00
committed by GitHub
parent e8c9ec076c
commit 1f6e52138a

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