2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-19 11:16:31 +00:00

move settings to registry

This commit is contained in:
Matthias
2021-11-20 18:01:19 +01:00
parent 8ac41970ad
commit 3aa40ce3e9
8 changed files with 25 additions and 16 deletions

View File

@@ -10,6 +10,8 @@ from django.db import models
from django.apps import apps
from django.conf import settings
from plugin import plugin_reg
class PluginConfig(models.Model):
""" A PluginConfig object holds settings for plugins.
@@ -64,7 +66,7 @@ class PluginConfig(models.Model):
self.__org_active = self.active
# append settings from registry
self.plugin = settings.INTEGRATION_PLUGINS.get(self.key, None)
self.plugin = plugin_reg.plugins.get(self.key, None)
def get_plugin_meta(name):
if self.plugin: