mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +00:00
Default value for SLug is None
This commit is contained in:
parent
d6145fc803
commit
d1c2a399eb
@ -237,6 +237,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
|||||||
"""
|
"""
|
||||||
The IntegrationPluginBase class is used to integrate with 3rd party software
|
The IntegrationPluginBase class is used to integrate with 3rd party software
|
||||||
"""
|
"""
|
||||||
|
PLUGIN_SLUG = None
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
@ -249,7 +250,9 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
|||||||
@property
|
@property
|
||||||
def slug(self):
|
def slug(self):
|
||||||
"""slug for the plugin"""
|
"""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)
|
return slugify(name)
|
||||||
|
|
||||||
def mixin(self, key):
|
def mixin(self, key):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user