2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Rename "has_globalsettings" -> "has_settings"

This commit is contained in:
Oliver
2022-01-01 23:14:34 +11:00
parent 7cb029e7c3
commit 737467a1fd
2 changed files with 6 additions and 12 deletions

View File

@ -17,11 +17,11 @@ class SettingsMixin:
def __init__(self):
super().__init__()
self.add_mixin('settings', 'has_globalsettings', __class__)
self.add_mixin('settings', 'has_settings', __class__)
self.globalsettings = getattr(self, 'SETTINGS', None)
@property
def has_globalsettings(self):
def has_settings(self):
"""
Does this plugin use custom global settings
"""
@ -32,7 +32,7 @@ class SettingsMixin:
"""
Get patterns for InvenTreeSetting defintion
"""
if self.has_globalsettings:
if self.has_settings:
return {f'PLUGIN_{self.slug.upper()}_{key}': value for key, value in self.globalsettings.items()}
return None