Browse Source

Fix plugin name resolution

jeremystretch 4 năm trước cách đây
mục cha
commit
e2286a4c48
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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'
 
     def ready(self):
-        plugin_name = self.name.rsplit('.', 1)[1]
+        plugin_name = self.name.rsplit('.', 1)[-1]
 
         # Register template content (if defined)
         template_extensions = import_object(f"{self.__module__}.{self.template_extensions}")