mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
- 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 <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
e8c9ec076c
commit
1f6e52138a
@ -60,6 +60,9 @@ def register_event(event, *args, **kwargs):
|
|||||||
|
|
||||||
# Determine if there are any plugins which are interested in responding
|
# Determine if there are any plugins which are interested in responding
|
||||||
if settings.PLUGIN_TESTING or InvenTreeSetting.get_setting('ENABLE_PLUGINS_EVENTS'):
|
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():
|
with transaction.atomic():
|
||||||
for slug, plugin in registry.plugins.items():
|
for slug, plugin in registry.plugins.items():
|
||||||
if not plugin.mixin_enabled('events'):
|
if not plugin.mixin_enabled('events'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user