2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00

Default value for SLug is None

This commit is contained in:
Matthias 2021-10-04 12:19:43 +02:00
parent d6145fc803
commit d1c2a399eb
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -237,6 +237,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
"""
The IntegrationPluginBase class is used to integrate with 3rd party software
"""
PLUGIN_SLUG = None
def __init__(self):
super().__init__()
@ -249,7 +250,9 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
@property
def slug(self):
"""slug for the plugin"""
name = getattr(self, 'PLUGIN_SLUG', self.plugin_name())
name = getattr(self, 'PLUGIN_SLUG', None)
if not name:
name = self.plugin_name()
return slugify(name)
def mixin(self, key):