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,14 +272,15 @@ 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')
|
|
||||||
for slug, plugin in plugins:
|
self.mixins_settings = {}
|
||||||
if plugin.mixin_enabled('settings'):
|
|
||||||
plugin_setting = plugin.settings
|
for slug, plugin in plugins:
|
||||||
self.mixins_settings[slug] = plugin_setting
|
if plugin.mixin_enabled('settings'):
|
||||||
|
plugin_setting = plugin.settings
|
||||||
|
self.mixins_settings[slug] = plugin_setting
|
||||||
|
|
||||||
def deactivate_integration_settings(self):
|
def deactivate_integration_settings(self):
|
||||||
|
|
||||||
@ -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