From dc7b88515e35fcfd627f7660976737392fd21815 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 5 Apr 2022 00:27:13 +0200 Subject: [PATCH] rename class to make it clearer --- InvenTree/common/models.py | 4 ++-- InvenTree/plugin/models.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 """