From 04820c894b35ad70910f53ee29eb2424129d6145 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 30 Dec 2021 23:04:08 +1100 Subject: [PATCH] getattr should look for "SETTINGS" and not "GLOBALSETTINGS" --- InvenTree/plugin/builtin/integration/mixins.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/InvenTree/plugin/builtin/integration/mixins.py b/InvenTree/plugin/builtin/integration/mixins.py index 3a6b558db7..0af66333cb 100644 --- a/InvenTree/plugin/builtin/integration/mixins.py +++ b/InvenTree/plugin/builtin/integration/mixins.py @@ -1,14 +1,19 @@ -"""default mixins for IntegrationMixins""" +""" +Plugin mixin classes +""" + from django.conf.urls import url, include from plugin.urls import PLUGIN_BASE class GlobalSettingsMixin: - """Mixin that enables global settings for the plugin""" + """ + Mixin that enables global settings for the plugin + """ + class MixinMeta: - """meta options for this mixin""" - MIXIN_NAME = 'Global settings' + MIXIN_NAME = 'Settings' def __init__(self): super().__init__() @@ -19,7 +24,7 @@ class GlobalSettingsMixin: """ setup global settings for this plugin """ - return getattr(self, 'GLOBALSETTINGS', None) + return getattr(self, 'SETTINGS', None) @property def has_globalsettings(self):