mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 12:05:53 +00:00
added version identifier
This commit is contained in:
@ -258,6 +258,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
||||
|
||||
AUTHOR = None
|
||||
PUBLISH_DATE = None
|
||||
VERSION = None
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -304,6 +305,12 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
||||
name = _('No date found')
|
||||
return name
|
||||
|
||||
@property
|
||||
def version(self):
|
||||
"""returns version of plugin"""
|
||||
name = getattr(self, 'VERSION', None)
|
||||
return name
|
||||
|
||||
# mixins
|
||||
def mixin(self, key):
|
||||
"""check if mixin is registered"""
|
||||
|
Reference in New Issue
Block a user