mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fix plugin name resolution
This commit is contained in:
@ -252,6 +252,7 @@ class StatusView(APIView):
|
|||||||
# Gather installed plugins
|
# Gather installed plugins
|
||||||
plugins = {}
|
plugins = {}
|
||||||
for plugin_name in settings.PLUGINS:
|
for plugin_name in settings.PLUGINS:
|
||||||
|
plugin_name = plugin_name.rsplit('.', 1)[-1]
|
||||||
plugin_config = apps.get_app_config(plugin_name)
|
plugin_config = apps.get_app_config(plugin_name)
|
||||||
plugins[plugin_name] = getattr(plugin_config, 'version', None)
|
plugins[plugin_name] = getattr(plugin_config, 'version', None)
|
||||||
plugins = {k: v for k, v in sorted(plugins.items())}
|
plugins = {k: v for k, v in sorted(plugins.items())}
|
||||||
|
Reference in New Issue
Block a user