Merge pull request #2546 from SchrodingersGat/plugin-bool-fix

Display "boolean" plugin setting values as checkboxes
This commit is contained in:
Oliver 2022-01-13 17:18:01 +11:00 committed by GitHub
commit 9b1ccedbb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,12 @@ class PluginSetting(common.models.BaseInvenTreeSetting):
so that we can pass the plugin instance
"""
def is_bool(self, **kwargs):
kwargs['plugin'] = self.plugin
return super().is_bool(**kwargs)
@property
def name(self):
return self.__class__.get_setting_name(self.key, plugin=self.plugin)