mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
- 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:
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…
Reference in New Issue
Block a user