mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix - always allow plugins to register settings
This commit is contained in:
parent
794a9e75e8
commit
0ab9b2dbc7
@ -272,10 +272,11 @@ class PluginsRegistry:
|
|||||||
self.deactivate_integration_settings()
|
self.deactivate_integration_settings()
|
||||||
|
|
||||||
def activate_integration_settings(self, plugins):
|
def activate_integration_settings(self, plugins):
|
||||||
from common.models import InvenTreeSetting
|
|
||||||
|
|
||||||
if settings.PLUGIN_TESTING or InvenTreeSetting.get_setting('ENABLE_PLUGINS_GLOBALSETTING'):
|
|
||||||
logger.info('Registering IntegrationPlugin global settings')
|
logger.info('Registering IntegrationPlugin global settings')
|
||||||
|
|
||||||
|
self.mixins_settings = {}
|
||||||
|
|
||||||
for slug, plugin in plugins:
|
for slug, plugin in plugins:
|
||||||
if plugin.mixin_enabled('settings'):
|
if plugin.mixin_enabled('settings'):
|
||||||
plugin_setting = plugin.settings
|
plugin_setting = plugin.settings
|
||||||
@ -290,7 +291,7 @@ class PluginsRegistry:
|
|||||||
plugin_settings.update(plugin_setting)
|
plugin_settings.update(plugin_setting)
|
||||||
|
|
||||||
# clear cache
|
# clear cache
|
||||||
self.mixins_Fsettings = {}
|
self.mixins_settings = {}
|
||||||
|
|
||||||
def activate_integration_app(self, plugins, force_reload=False):
|
def activate_integration_app(self, plugins, force_reload=False):
|
||||||
"""activate AppMixin plugins - add custom apps and reload
|
"""activate AppMixin plugins - add custom apps and reload
|
||||||
|
Loading…
Reference in New Issue
Block a user