mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
registry reanme fix
This commit is contained in:
parent
9601811827
commit
0b9a6a1123
@ -10,7 +10,7 @@ from django.db import models
|
|||||||
|
|
||||||
import common.models
|
import common.models
|
||||||
|
|
||||||
from plugin import InvenTreePlugin, plugin_registry
|
from plugin import InvenTreePlugin, registry
|
||||||
|
|
||||||
|
|
||||||
class PluginConfig(models.Model):
|
class PluginConfig(models.Model):
|
||||||
@ -72,7 +72,7 @@ class PluginConfig(models.Model):
|
|||||||
self.__org_active = self.active
|
self.__org_active = self.active
|
||||||
|
|
||||||
# append settings from registry
|
# append settings from registry
|
||||||
self.plugin = plugin_registry.plugins.get(self.key, None)
|
self.plugin = registry.plugins.get(self.key, None)
|
||||||
|
|
||||||
def get_plugin_meta(name):
|
def get_plugin_meta(name):
|
||||||
if self.plugin:
|
if self.plugin:
|
||||||
@ -95,10 +95,10 @@ class PluginConfig(models.Model):
|
|||||||
|
|
||||||
if not reload:
|
if not reload:
|
||||||
if self.active is False and self.__org_active is True:
|
if self.active is False and self.__org_active is True:
|
||||||
plugin_registry.reload_plugins()
|
registry.reload_plugins()
|
||||||
|
|
||||||
elif self.active is True and self.__org_active is False:
|
elif self.active is True and self.__org_active is False:
|
||||||
plugin_registry.reload_plugins()
|
registry.reload_plugins()
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ class PluginSetting(common.models.BaseInvenTreeSetting):
|
|||||||
if issubclass(plugin.__class__, InvenTreePlugin):
|
if issubclass(plugin.__class__, InvenTreePlugin):
|
||||||
plugin = plugin.plugin_config()
|
plugin = plugin.plugin_config()
|
||||||
|
|
||||||
kwargs['settings'] = plugin_registry.mixins_settings.get(plugin.key, {})
|
kwargs['settings'] = registry.mixins_settings.get(plugin.key, {})
|
||||||
|
|
||||||
return super().get_setting_definition(key, **kwargs)
|
return super().get_setting_definition(key, **kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user