Ver Fonte

Fixes #4646: Correct UI link for reports with custom name

Jeremy Stretch há 5 anos atrás
pai
commit
ba91b3aa2e
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 0
      docs/release-notes/version-2.8.md
  2. 2 2
      netbox/extras/reports.py

+ 1 - 0
docs/release-notes/version-2.8.md

@@ -6,6 +6,7 @@ v2.8.5 (FUTURE)
 
 * [#3304](https://github.com/netbox-community/netbox/issues/3304) - Fix caching invalidation issue related to device/virtual machine primary IP addresses
 * [#4644](https://github.com/netbox-community/netbox/issues/4644) - Fix ordering of services table by parent
+* [#4646](https://github.com/netbox-community/netbox/issues/4646) - Correct UI link for reports with custom name
 * [#4647](https://github.com/netbox-community/netbox/issues/4647) - Fix caching invalidation issue related to assigning new IP addresses to interfaces
 
 ---

+ 2 - 2
netbox/extras/reports.py

@@ -92,7 +92,7 @@ class Report(object):
         self.active_test = None
         self.failed = False
 
-        self.logger = logging.getLogger(f"netbox.reports.{self.module}.{self.name}")
+        self.logger = logging.getLogger(f"netbox.reports.{self.full_name}")
 
         # Compile test methods and initialize results skeleton
         test_methods = []
@@ -120,7 +120,7 @@ class Report(object):
 
     @property
     def full_name(self):
-        return '.'.join([self.module, self.name])
+        return '.'.join([self.__module__, self.__class__.__name__])
 
     def _log(self, obj, message, level=LOG_DEFAULT):
         """