Sfoglia il codice sorgente

Fix plugin name resolution

jeremystretch 4 anni fa
parent
commit
e2286a4c48
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      netbox/extras/plugins/__init__.py

+ 1 - 1
netbox/extras/plugins/__init__.py

@@ -62,7 +62,7 @@ class PluginConfig(AppConfig):
     user_preferences = 'preferences.preferences'
     user_preferences = 'preferences.preferences'
 
 
     def ready(self):
     def ready(self):
-        plugin_name = self.name.rsplit('.', 1)[1]
+        plugin_name = self.name.rsplit('.', 1)[-1]
 
 
         # Register template content (if defined)
         # Register template content (if defined)
         template_extensions = import_object(f"{self.__module__}.{self.template_extensions}")
         template_extensions = import_object(f"{self.__module__}.{self.template_extensions}")