diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index c1885e0aad..5b1debc7aa 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -636,13 +636,13 @@ class BaseInvenTreeSetting(models.Model): return setting.get('protected', False) -class GenericSettingClassMixin: +class GenericReferencedSettingClass: """ This mixin can be used to add reference keys to static properties Sample: ```python - class SampleSetting(GenericSettingClassMixin, common.models.BaseInvenTreeSetting): + class SampleSetting(GenericReferencedSettingClass, common.models.BaseInvenTreeSetting): class Meta: unique_together = [ ('sample', 'key'), diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py index 29bea5d02e..4614a079cc 100644 --- a/InvenTree/plugin/models.py +++ b/InvenTree/plugin/models.py @@ -101,7 +101,7 @@ class PluginConfig(models.Model): return ret -class PluginSetting(common.models.GenericSettingClassMixin, common.models.BaseInvenTreeSetting): +class PluginSetting(common.models.GenericReferencedSettingClass, common.models.BaseInvenTreeSetting): """ This model represents settings for individual plugins """ @@ -150,7 +150,7 @@ class PluginSetting(common.models.GenericSettingClassMixin, common.models.BaseIn ) -class NotificationUserSetting(common.models.GenericSettingClassMixin, common.models.BaseInvenTreeSetting): +class NotificationUserSetting(common.models.GenericReferencedSettingClass, common.models.BaseInvenTreeSetting): """ This model represents notification settings for a user """